Ejemplo n.º 1
0
 // creates the player
 private Player createPlayer() {
   IPlayerCreator playerCreator = new PlayerCreator();
   Player player = playerCreator.createNewPlayer();
   generateStartingBlockamon(player);
   player.setLocation(playerXStartingLocation, playerYStartingLocation);
   final String message =
       String.format(_receivedMessageFormat, player.getLeadBlockamon().elementType());
   displayDialog(message, "Block received", JOptionPane.INFORMATION_MESSAGE);
   return player;
 }
Ejemplo n.º 2
0
 // player loses a battle and all blockamon in their party have lost all HealthPoints
 public void playerWhitedOut() {
   player.setLocation(healingCenter.getX(), healingCenter.getY());
   player.healAllBlockamon();
   player.loseMoney();
   playingField.repaint();
 }