Fixed adding blocks
This commit is contained in:
parent
b769ad0ca6
commit
48c17f5c92
@ -130,7 +130,7 @@ public class Map {
|
||||
public void createMap() {
|
||||
for (int i = 0; i < mapArray.length; i++) {
|
||||
for (int j = 0; j < mapArray.length; j++) {
|
||||
if (mapArray[i][j] == TypeOfCell.BLOCK) {
|
||||
if (mapArray[i][j] == TypeOfCell.BLOCK && !isBusyCell(i,j)) {
|
||||
block.add(new Block(i, j, imageCell));
|
||||
}
|
||||
|
||||
|
||||
@ -15,8 +15,8 @@ import java.awt.event.KeyEvent;
|
||||
|
||||
public class WindowOfFreeMove extends JFrame {
|
||||
public static final int CELL_SIZE = 40;
|
||||
public static final int CANVAS_WIDTH = 25;
|
||||
public static final int CANVAS_HEIGHT = 25;
|
||||
public static final int CANVAS_WIDTH = 10;
|
||||
public static final int CANVAS_HEIGHT = 10;
|
||||
|
||||
private static boolean canPersonMove;
|
||||
private static int nextMove;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user