Example #1
0
 public void clearGameBoard() {
   for (final Tile tile : this.gameBoard) {
     if (tile.isTileOccupied()) {
       tile.removePiece();
     }
   }
 }
Example #2
0
 public void calculateActivePieces() {
   for (final Tile t : this.gameBoard) {
     if (t.isTileOccupied()) {
       final Piece p = t.getPiece();
       switch (p.getPieceAllegiance()) {
         case WHITE:
           this.whitePieces.add(p);
           break;
         case BLACK:
           this.blackPieces.add(p);
           break;
         default:
           throw new RuntimeException("wtf");
       }
     }
   }
 }