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
 public void tileChanged(Position p) {
   map.get(board.getTileAtPosition(p)).repaint();
 }