Skip to content
Snippets Groups Projects
Commit 0b1c2454 authored by Carry Morgane's avatar Carry Morgane
Browse files

Created constructor for Board

parent 06d8db21
No related branches found
No related tags found
No related merge requests found
package model;
public class Board {
private int[][] board;
private Car[] cars;
private Position exit;
public Board(int size, int nbcars){
board = new int[size][size];
for ( int i=0 ; i < size ; i++){
for ( int j=0 ; j< size ; j++){
board[i][j] = -1;
}
}
cars = new Car[nbcars];
}
public boolean isSolved(){
return board[exit.getX()][exit.getY()] == 0;
}
//getAllPossibleMoves();
}
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