You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
549 B

import java.util.Arrays;
public class Gameboard {
int[] board;
public Gameboard() {
board = new int[56];
}
public void initGameboard (){
for(int i = 0; i < 40; i++) {
if ( i % 10 == 0) {
board[i] = 1;
}
if( i % 10 == 9) {
board[i] = 2;
}
}
for (int i = 40; i < board.length; i++) {
board[i] = 3;
}
}
@Override
public String toString() {
return Arrays.toString(board);
}
}