private Entity chooseEntity(Coords pos){
  Entity choice=null;
  List<Entity> entities=game.getEntitiesVector(pos);
  if (entities.size() == 1) {
    choice=entities.get(0);
  }
 else   if (entities.size() > 1) {
    String input=(String)JOptionPane.showInputDialog(null,Messages.getString("BoardView1.ChooseEntityDialog.message",new Object[]{pos.getBoardNum()}),Messages.getString("BoardView1.ChooseEntityDialog.title"),JOptionPane.QUESTION_MESSAGE,null,SharedUtility.getDisplayArray(entities),null);
    choice=(Entity)SharedUtility.getTargetPicked(entities,input);
  }
  return choice;
}

private Entity chooseEntity ( Coords pos ) { Entity choice = null ; List < Entity > entities = game . getEntitiesVector ( pos ) ; if ( entities . size ( ) == 1 ) { choice = entities . get ( 0 ) ; } else if ( entities . size ( ) > 1 ) { String input = ( String ) JOptionPane . showInputDialog ( null , Messages . getString ( "BoardView1.ChooseEntityDialog.message" , new Object [ ] { pos . getBoardNum ( ) } ) , Messages . getString ( "BoardView1.ChooseEntityDialog.title" ) , JOptionPane . QUESTION_MESSAGE , null , SharedUtility . getDisplayArray ( entities ) , null ) ; choice = ( Entity ) SharedUtility . getTargetPicked ( entities , input ) ; } return choice ; }
have the player select an entity from the entities at the given coords .
