Examples of Difficulty


Examples of ch.sahits.game.openpatrician.model.Difficulty

          try {
            int homeTownIndex = home.getSelectedIndex();
            IMap gameMap = GameFactory.createMap(); // TODO consider custom maps

            EObjective obj = EObjective.values()[objective.getSelectedIndex()];
            Difficulty diff = difficulity;
            EGameSpeed gameSpeed = EGameSpeed.values()[speed.getSelectedIndex()];
            int startyear = Integer.parseInt(startYear.getSelected());
            IGame game = GameFactory.createGame(gameMap, obj, diff, gameSpeed, startyear);

           
View Full Code Here

Examples of ch.sahits.game.openpatrician.model.Difficulty

            RandomNameLoader shipLoader = new RandomNameLoader("shipnames.properties");
            IShip ship = ShipFactory.createCrayer(shipLoader.getRandomName(), EShipUpgrade.LEVEL1);
            player.addShipp(ship);

            EObjective obj = EObjective.values()[objective.getSelectedIndex()];
            Difficulty diff = difficulity;
            EGameSpeed gameSpeed = EGameSpeed.values()[speed.getSelectedIndex()];
            int startyear = Integer.parseInt(startYear.getSelected());
            IGame game = GameFactory.createGame(gameMap, obj, diff, gameSpeed, startyear);
            // Initialize the player
            new NewGameEvent(ENewGame.SINGELPLAYER).notify(player);
View Full Code Here

Examples of com.madgnome.jira.plugins.jirachievements.data.ao.Difficulty

    for (UserAchievement userAchievement : userAchievements)
    {
      Achievement achievement = userAchievement.getAchievement();
      if (achievement.isActive())
      {
        final Difficulty difficulty = achievement.getDifficulty();
        Integer count = achievementsByLevel.get(difficulty);
        if (count == null)
        {
          count = 0;
        }
View Full Code Here

Examples of er.bugtracker.Difficulty

    TestItemState requirement = TestItemState.clazz.createAndInsertObject(editingContext);
    requirement._setValueForPrimaryKey("rqmt", "oid");
    requirement.setSortOrder(Integer.valueOf(4));
    requirement.setName("Requirement");

    Difficulty hardDifficulty = Difficulty.clazz.createAndInsertObject(editingContext);
    hardDifficulty._setValueForPrimaryKey(Integer.valueOf(1), "id");
    hardDifficulty.setDifficultyDescription("Hard");

    Difficulty mediumDifficulty = Difficulty.clazz.createAndInsertObject(editingContext);
    mediumDifficulty._setValueForPrimaryKey(Integer.valueOf(2), "id");
    mediumDifficulty.setDifficultyDescription("Medium");

    Difficulty easyDifficulty = Difficulty.clazz.createAndInsertObject(editingContext);
    easyDifficulty._setValueForPrimaryKey(Integer.valueOf(3), "id");
    easyDifficulty.setDifficultyDescription("Easy");

    RequirementSubType essential = RequirementSubType.clazz.createAndInsertObject(editingContext);
    essential._setValueForPrimaryKey(Integer.valueOf(1), "id");
    essential.setSubTypeDescription("Essential");
View Full Code Here

Examples of games.memory.difficulty.Difficulty

    @Test
    public void testInitilization()
    {
        Memory.reset();
        Memory memory = Memory.getInstance();
        Difficulty diff = new EasyDifficulty();
        memory.setDifficulty(diff);
        assertEquals(10, memory.getLives());
    }
View Full Code Here

Examples of org.bukkit.Difficulty

        // @tags
        // <w@world.difficulty>
        // -->
        if (mechanism.matches("difficulty") && mechanism.requireEnum(true, Difficulty.values())) {
            String upper = value.asString().toUpperCase();
            Difficulty diff = null;
            if (upper.matches("(PEACEFUL|EASY|NORMAL|HARD)")) {
                diff = Difficulty.valueOf(upper);
            }
            else {
                diff = Difficulty.getByValue(value.asInt());
View Full Code Here

Examples of org.bukkit.Difficulty

        if (args.length != 1 || args[0].length() == 0) {
            sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
            return false;
        }

        Difficulty difficulty = Difficulty.getByValue(getDifficultyForString(sender, args[0]));

        if (Bukkit.isHardcore()) {
            difficulty = Difficulty.HARD;
        }

        Bukkit.getWorlds().get(0).setDifficulty(difficulty);

        int levelCount = 1;
        if (Bukkit.getAllowNether()) {
            Bukkit.getWorlds().get(levelCount).setDifficulty(difficulty);
            levelCount++;
        }

        if (Bukkit.getAllowEnd()) {
            Bukkit.getWorlds().get(levelCount).setDifficulty(difficulty);
        }

        Command.broadcastCommandMessage(sender, "Set difficulty to " + difficulty.toString());
        return true;
    }
View Full Code Here

Examples of org.bukkit.Difficulty

            }
        }

        if(isEntityEnabled(event.getEntity(), visionEnabled)) {
            if(event.getTarget() == null) return;
            Difficulty diff = event.getEntity().getWorld().getDifficulty();

            if (event.getReason() != TargetReason.CLOSEST_PLAYER && event.getReason() != TargetReason.RANDOM_TARGET)
                return; // Just making sure

            LivingEntity enemy = (LivingEntity) event.getEntity();
View Full Code Here

Examples of org.bukkit.Difficulty

  }

  @Override
  public Difficulty select(String arg, CommandSender sender)
  {
    Difficulty ret = null;
   
    arg = arg.toLowerCase();

    if (arg.startsWith("p"))
    {
View Full Code Here

Examples of org.bukkit.Difficulty

      WorldConfig wc = WorldConfig.get(worldname);
        if (args.length == 0) {
          String diff = wc.difficulty.toString().toLowerCase();
          message(ChatColor.YELLOW + "Difficulty of world '" + worldname + "' is set at " + ChatColor.WHITE + diff);
        } else {
          Difficulty diff = Conversion.toDifficulty.convert(args[0]);
          if (diff != null) {
          wc.difficulty = diff;
          wc.updateDifficulty(wc.getWorld());
          message(ChatColor.YELLOW + "Difficulty of world '" + worldname + "' set to " + ChatColor.WHITE + diff.toString().toLowerCase());
          } else {
            message(ChatColor.RED + "Difficulty '" + args[0] + "' has not been recognized!");
          }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.