Fixed adding blocks

This commit is contained in:
iryupnik 2020-03-13 14:40:58 +01:00
parent b769ad0ca6
commit 48c17f5c92
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ public class Map {
public void createMap() { public void createMap() {
for (int i = 0; i < mapArray.length; i++) { for (int i = 0; i < mapArray.length; i++) {
for (int j = 0; j < mapArray.length; j++) { 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)); block.add(new Block(i, j, imageCell));
} }

View File

@ -15,8 +15,8 @@ import java.awt.event.KeyEvent;
public class WindowOfFreeMove extends JFrame { public class WindowOfFreeMove extends JFrame {
public static final int CELL_SIZE = 40; public static final int CELL_SIZE = 40;
public static final int CANVAS_WIDTH = 25; public static final int CANVAS_WIDTH = 10;
public static final int CANVAS_HEIGHT = 25; public static final int CANVAS_HEIGHT = 10;
private static boolean canPersonMove; private static boolean canPersonMove;
private static int nextMove; private static int nextMove;