Exemplo n.º 1
0
 private List<TilePanel> getValidMovementPanels(Tile from, Unit unit) {
   List<TilePanel> result = new ArrayList<TilePanel>();
   List<Position> validMoves = movementStrategy.getValidMoves(unit, from.getPosition(), unitMap);
   for (Position validMove : validMoves) {
     TilePanel e = map.get(board.getTileAtPosition(validMove));
     if (e != null) {
       result.add(e);
     }
   }
   return result;
 }
Exemplo n.º 2
0
 private void resetPositions() {
   for (Tile tile : board.getTiles()) {
     unitMap.put(tile.getPosition(), tile.getUnits());
   }
 }