fix wrapping
This commit is contained in:
parent
d864db5aad
commit
f17b27e0b5
BIN
Pacman.class
BIN
Pacman.class
Binary file not shown.
@ -32,7 +32,7 @@ public class Pacman {
|
||||
if (keyCode == game.DOWN) {
|
||||
y += game.cellSize;
|
||||
}
|
||||
if (!game.wantMove(oldX/game.cellSize, oldY/game.cellSize, x/game.cellSize, y/game.cellSize)) {
|
||||
if (!game.wantMove(oldX/game.cellSize, oldY/game.cellSize, (x-game.cellSize/2)/game.cellSize, (y-game.cellSize/2)/game.cellSize)) {
|
||||
x = oldX;
|
||||
y = oldY;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user