Professional Documents
Culture Documents
int x1 = rand.nextInt((16 - 0) + 1) + 0;
int y1 = rand.nextInt((16 - 0) + 1) + 0;
int falseCounter = 0;
board[x1][y1].setBackground(Color.GREEN);
check(cNew);
if (placed == false) {
canMove = false;
}
}
x1 = rand.nextInt((16 - 0) + 1) + 0;
y1 = rand.nextInt((16 - 0) + 1) + 0;
placed = false;
falseCounter++;
}
}
if (board[c.row - 1][c.column].getText().equals("")) {
if (player) {
} else {
}
}
}
}
}
//proverka na dolnite po red i koloni
public void checkBottomSquares(Container c) {
if (board[c.row + 1][c.column].getText().equals("")) {
if (player) {
} else {
}
}
}
}
//proverka na levite po red i koloni
public void checkLeftSquares(Container c) {
if (c.column - 2 >= 0) {
if (board[c.row][c.column - 1].getText().equals("")) {
if (player) {
} else {
if (board[c.row][c.column + 1].getText().equals("")) {
if (player) {