Package net.sertik.genesia.entity

Examples of net.sertik.genesia.entity.Player


        Game game = new Game();
        game.setDifficulty((Game.Difficulty) gameLevel.getSelectedToggle().getUserData());

        int totalPlayers = (Integer) numberOfPlayers.getSelectedToggle().getUserData();
        for (int i = 0; i < totalPlayers; i++) {
          Player player = new Player();
          player.setComputer(false);
          player.setColor(Player.COLORS[i]);
          switch (game.getDifficulty()) {
            case BEGINNER:
              player.setGold(12000);
            case NORMAL:
              player.setGold(10000);
            case ADVANCED:
              player.setGold(8000);
          }
          game.getPlayers().add(player);
        }
        for (int i = totalPlayers; i < 3; i++) {
          Player player = new Player();
          player.setComputer(true);
          player.setColor(Player.COLORS[i]);
          player.setName(Player.NAMES[i - totalPlayers]);
          switch (game.getDifficulty()) {
            case BEGINNER:
              player.setGold(8000);
            case NORMAL:
              player.setGold(10000);
            case ADVANCED:
              player.setGold(12000);
          }
          game.getPlayers().add(player);
        }

        WorldGenerator worldGenerator = (WorldGenerator) worldCreation.getSelectedToggle().getUserData();
View Full Code Here

TOP

Related Classes of net.sertik.genesia.entity.Player

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.