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