// 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; }
// 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(); }