@Test public void testnumPieces() { int N = 4; MutableBoard board = new MutableBoard(N); assertEquals(16, board.numPieces()); board.set(0, 2, RED); board.set(1, 2, BLUE); board.set(2, 2, RED); board.set(3, 2, BLUE); assertEquals(20, board.numPieces()); }
abstract int numPieces();
Board extends Observable { abstract int numPieces(); }
Board extends Observable { abstract int numPieces();  }
Board extends Observable { abstract int numPieces();  Square[] getData(); @Override String toString(); boolean winningCond(); String toDisplayString(); int neighborePos(int n, Direction pos); }
Board extends Observable { abstract int numPieces();  Square[] getData(); @Override String toString(); boolean winningCond(); String toDisplayString(); int neighborePos(int n, Direction pos);  }