Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game over but the game can still be played #1

Closed
hteumeuleu opened this issue Mar 15, 2023 · 3 comments
Closed

Game over but the game can still be played #1

hteumeuleu opened this issue Mar 15, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@hteumeuleu
Copy link
Owner

From user Bugpy on itch:

I'm getting a bug where the game over screen appears but I can continue the game behind. Sometimes it ends the game with possible moves left and although it's hard to see, I can still continue whilst the "Game Over" dialog is up and my score still goes up.

Screenshot 1 Screenshot 1 Screenshot 1 Screenshot 1

@hteumeuleu hteumeuleu added the bug Something isn't working label Mar 15, 2023
@hteumeuleu
Copy link
Owner Author

Here’s a save.json data to reproduce the problem after a few moves:

[
	"4,2,4,2,4,4,256,8,x,8,128,2,8,64,2,4",
	240
]

@hteumeuleu
Copy link
Owner Author

hteumeuleu commented Mar 25, 2023

Here’s another save.json to reproduce the problem with just one move:

[
	"x,2,8,16,4,256,16,2,32,64,128,4,4,2,4,2",
	420
]

@hteumeuleu
Copy link
Owner Author

Should be fixed in v1.0.3.

The problem was due to how the game was initialised from a previous save. Tile’s values would be set as a String instead of a Number. Then in the end of the game, when the grid is full, the game would incorrectly compare String values (from tiles restored from a previous save) with Number values (from tiles created during the game after loading).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant