Why is Eclipse keeps giving me error on the constructor:
public DenseBoard(Tile t[][]){
Board myBoard = new DenseBoard(t.length, t[0].length);
}
I think you DenseBoard class should implement all the Board class's abstract method. such like this:
package Game2048;
public class DenseBoard extends Board {
public DenseBoard(int rows, int cols){
super(rows, cols);
}
public DenseBoard(Tile t[][]){
Board myBoard = new DenseBoard(t.length, t[0].length);
}
public Board copy(){
}
public int getRows(){
}
public int getCols(){
}
public int getTileCount(){
}
public int getFreeSpaceCount(){
}
public Tile tileAt(int i, int j){
}
public boolean lastShiftMovedTiles(){
}
public boolean mergePossible(){
}
public void addTileAtFreeSpace(int freeI, Tile tile){
}
public int shiftLeft(){
}
public int shiftRight(){
}
public int shiftUp(){
}
public int shiftDown(){
}
}