Code Monkey home page Code Monkey logo

Comments (13)

davidmturner avatar davidmturner commented on July 18, 2024

Here's an example. From this state:

/------|------|------|------\
|      |      |    2 |      | 
|------|------|------|------|
|      |      |      |      | 
|------|------|------|------|
|      |      |      |      | 
|------|------|------|------|
|      |      |      |    4 | 
\------|------|------|------/

One move right, results in:

/------|------|------|------\
|      |      |      |      | 
|------|------|------|------|
|      |      |      |      | 
|------|------|------|------|
|      |    2 |      |      | 
|------|------|------|------|
|      |      |      |    4 | 
\------|------|------|------/

from bash2048.

srolfe avatar srolfe commented on July 18, 2024

Seems to mostly be with left / right movements. Up and down mostly work, but sometimes it seems like new tiles may disappear.

from bash2048.

alexflint avatar alexflint commented on July 18, 2024

I am experiencing the same thing.

from bash2048.

rpicard avatar rpicard commented on July 18, 2024

+1 on OS X if it matters.

from bash2048.

pierrei avatar pierrei commented on July 18, 2024

Same thing for me..

from bash2048.

JosefZIla avatar JosefZIla commented on July 18, 2024

I have tried a few times, but still have trouble reproducing this, can you please run new version with something like:
./bash2048.sh -l game.log

and then paste the relevant part of log file here?

from bash2048.

razasyedh avatar razasyedh commented on July 18, 2024

I'm on OSX also. In this example the 4 disappears and so does a 2:

Board status:
     |      |      |      | 
     |      |      |      | 
   4 |    2 |      |      | 
   2 |      |      |    2 | input: left key
move piece with value 4 from [8] to [7]
joined piece from [7] with [7], new value=0[7]
move piece with value 2 from [9] to [8]
move piece with value 2 from [12] to [11]
joined piece from [11] with [11], new value=0[11]
move piece with value 2 from [15] to [12]
Board status:
     |      |      |      | 
   2 |      |      |      | 
   2 |      |      |      | 
   2 |      |      |      | 

from bash2048.

rainydan avatar rainydan commented on July 18, 2024

Here's my repro. For clarity you might want to add '2 appears in [x]' events to the log.

Board status:
     |      |    2 |      | 
     |      |    2 |      | 
     |      |      |      | 
     |      |      |      | input: down key
move piece with value 2 from [6] to [14]
joined piece from [2] with [14], new value=4
Board status:
     |      |      |      | 
     |      |      |      | 
     |      |    2 |      | 
     |      |    4 |      | input: right key
move piece with value 2 from [10] to [11]
move piece with value 4 from [14] to [15]
move piece with value 2 from [11] to [12]
joined piece from [12] with [12], new value=0
Board status:
     |      |    2 |      | 
     |      |      |      | 
     |      |      |      | 
     |      |      |    4 | 

from bash2048.

skull-squadron avatar skull-squadron commented on July 18, 2024

push_pieces when $4 = "up" or "right" is where most the crunchiness lies.

Makes one want to do TDD for bash. :)

from bash2048.

skull-squadron avatar skull-squadron commented on July 18, 2024
Bash 2048 v1.0 RC1 (bugs: https://github.com/mydzor/bash2048/issues) pieces=2 target=2048

/------|------|------|------\
|      |    2 |      |      |
|------|------|------|------|
|      |      |      |      |
|------|------|------|------|
|    2 |      |      |      |
|------|------|------|------|
|      |      |      |      |
\------|------|------|------/

->

/------|------|------|------\
|      |    2 |      |      |
|------|------|------|------|
|      |      |      |      |
|------|------|------|------|
|      |      |      |      |
|------|------|------|------|
|      |      |      |      |
\------|------|------|------/

Oops, that's like 2 bugs.

  • Top 2 didn't move to right side.
  • Second 2 dropped off the universe.

from bash2048.

skull-squadron avatar skull-squadron commented on July 18, 2024

Is this a bash debugging interview? ; )

from bash2048.

JosefZIla avatar JosefZIla commented on July 18, 2024

it seems that these problems only happen on Macs and from reproductions I see that for some reason seq command does not work the same way as in linux, I replaced seq with bash function for generating sequential lists. Can someone verify if it works now? (Unfortunately, I dont know anyone with mac in my vicinity)

from bash2048.

davidmturner avatar davidmturner commented on July 18, 2024

Looks good to me!

from bash2048.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.