Why is Eclipse keeps giving me error on the constructor:
public DenseBoard(Tile t[][]){
Board myBoard = new DenseBoard(t.length, t[0].length);
}
In your class Board
you only have one constructor which requires 2 int
arguments.
And since DenseBoard
extends Board
, each of the constructor in DenseBoard
should call some constructor in Board
.
If Board
had a no-arg constructor, the compiler would automatically call it for you. But since you don't have one, you should call another constructor explicitly from your public DenseBoard(Tile t[][])
.