mirror of
https://github.com/jeremysrand/apple2048.git
synced 2024-06-08 21:29:30 +00:00
Fix bug where new tiles were being added even when no tiles were moved
This commit is contained in:
parent
4b2930c433
commit
16b96a515c
2
game.c
2
game.c
|
@ -148,7 +148,7 @@ void slideInDirection(tDir dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; ((pos >= 0) && (pos < NUM_TILES)); pos += incr) {
|
for ( ; ((pos >= 0) && (pos < NUM_TILES)); pos += incr) {
|
||||||
if (gTileValues[pos] == BLOCKED_TILE_VALUE)
|
if (gTileValues[pos] <= 0)
|
||||||
continue;
|
continue;
|
||||||
destPos = nextPosInDir(pos, dir);
|
destPos = nextPosInDir(pos, dir);
|
||||||
if (destPos == pos)
|
if (destPos == pos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user