Skip to content
Snippets Groups Projects
Commit 49cb47eb authored by Carry Morgane's avatar Carry Morgane
Browse files
parents 5a32fb26 e90e05d1
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -101,20 +101,20 @@ public class Board {
return sb.toString();
}
public int[][] getBoard()
{
return board;
public int getValue(int x, int y) {
return board[x][y];
}
public void setBoard(int[][] board)
{
this.board = board;
}
public int getValue(Position pos) {
return board[pos.getX()][pos.getY()];
}
public void setValue(int x, int y, int value) {
board[x][y] = value;
}
public void setValue(Position pos, int value) {
board[pos.getX()][pos.getY()] = value;
}
public static void main(String[]args) throws IOException{
Board test = new Board("testlevel.txt");
System.out.println(test.toString());
test.cars[0].moveForward(test.board, 1);
System.out.println(test.toString());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment