Examples of Game


Examples of de.axxeed.animosy.model.Game

  /* (non-Javadoc)
   * @see de.axxeed.animosy.ai.MrXInterface#run()
   */
  public void run() {
    int moveNo = -1;
    Game game = Manager.getGame();
    while (true) {
      if(game.getState()==Game.MOVE_MRX) {
        if(game.getCurrentMove() != moveNo) {
          this.setPriority(6);
          log.info("Moving MrX in separate thread (move #"+game.getCurrentMove()+")...");
          moveNo = game.getCurrentMove();
         
          Node mrXMove = moveMrX();
          int type = game.getBoard().getMrX().changePosition(mrXMove);
          Manager.getGame().getTracker().nextMove(type);
          log.debug("MrX move done...");
          this.setPriority(Thread.NORM_PRIORITY);
          Manager.getGame().nextDetective();

        }
      }
      if(game.getState()==Game.WIN_MRX || game.getState()==Game.WIN_DET || game.getState()==Game.NO_GAME) {
        break;
      }
      else {
        try {
          Thread.sleep(1000);
View Full Code Here

Examples of de.beimax.simplespleef.game.Game

   */
  protected void announceCommand(CommandSender sender, String[] args) {
    // too many arguments?
    if (tooManyArguments(sender, args, 1)) return;
    // get game from 2nd argument
    Game arena = this.getArenaFromArgument(sender, args, 1);
    if (arena != null) { // no errors - then try to announce new game
      SimpleSpleef.getGameHandler().announce(sender, arena);
    }
  }
View Full Code Here

Examples of de.creepsmash.server.game.Game

          + "' but a game with the same name exists already");
      sender.send(new CreateGameResponseMessage(ResponseType.failed));
      return null;
    }

    Game game =
      new Game(this.nextGameId++, gameName, mapId, maxPlayers, sender, Passwort, MaxEloPoints, MinEloPoints);
    logger.info("new game: " + game);
    this.games.add(game);
    game.addObserver(this);
    sender.send(new CreateGameResponseMessage(ResponseType.ok));

    this.clients.remove(sender);
    game.newClient(sender);

    sendAll(playersMessage());
    return game;
  }
View Full Code Here

Examples of de.zelosfan.timedstrategy.Game

        } else if (Main.map <= 4) {
            rendermanager.drawIndependent(Main.textureRegionObjectMap.get("tut" + Main.map), 0, 0, 1, 0.8f, 0);
        } else if (Main.map >= 6) {
            rendermanager.drawIndependent(Main.textureRegionObjectMap.get("end"), 0, 0, 1, 0.8f, 0);
        } else {
            Main.game = new Game(Main.map);
            Main.game.changeToPlanningPhase();
            Main.gameStateManager.setCurrentGameState(new IngamePlanning(Main.gameStateManager, true));
        }
    }
View Full Code Here

Examples of dojo.trivia.a20120505cr4.Game

   }

   // reorder sequence
   // extract method
   public static void play(Random rand) {
      Game aGame = new Game();

      aGame.addPlayer("Chet");
      aGame.addPlayer("Pat");
      aGame.addPlayer("Sue");

      do {

         int diceCast = rand.nextInt(5) + 1;
         aGame.moveCurrentPlayerWith(diceCast);

         boolean correctAnswer = rand.nextInt(9) != 7;
         if (correctAnswer) {
            notAWinner = aGame.currentPlayerGaveCorrectAnswer();
         } else {
            notAWinner = aGame.currentPlayerGaveWrongAnswer();
         }

      } while (notAWinner);
   }
View Full Code Here

Examples of dojo.trivia.a20120505cr5.Game

   }

   // reorder sequence
   // extract method
   public static void play(Random rand) {
      Game aGame = new Game();

      aGame.add("Chet");
      aGame.add("Pat");
      aGame.add("Sue");

      do {

         aGame.roll(rand.nextInt(5) + 1);

         if (rand.nextInt(9) == 7) {
            notAWinner = aGame.wrongAnswer();
         } else {
            notAWinner = aGame.wasCorrectlyAnswered();
         }

      } while (notAWinner);
   }
View Full Code Here

Examples of dojo.trivia.a20120505cr6.Game

   }

   // reorder sequence
   // extract method
   public static void play(Random rand) {
      Game aGame = new Game();

      aGame.add("Chet");
      aGame.add("Pat");
      aGame.add("Sue");

      do {

         aGame.roll(rand.nextInt(5) + 1);

         if (rand.nextInt(9) == 7) {
            notAWinner = aGame.wrongAnswer();
         } else {
            notAWinner = aGame.wasCorrectlyAnswered();
         }

      } while (notAWinner);
   }
View Full Code Here

Examples of domain.Game

    /**
     * initializes new game and display objects
     * to start a new game
     */
    public void initialize() {
        game = new Game();
        display = new Display();
        display.setApp(this);
    }
View Full Code Here

Examples of es.mahulo.battleship.model.Game

    logger.debug("user found: " + user);
   
    List<Game> games = new ArrayList<Game>();

    for (Player player :user.getPlayers() ) {
      Game game = player.getGame();
      if (game.getStatus()!=GameStatus.Wind1 ||
          game.getStatus()!=GameStatus.Wind2 ||
          game.getStatus()!=GameStatus.Draw ) {
        games.add(game);
      }
    }
   
View Full Code Here

Examples of facebook4j.Game

            JSONArray list = json.getJSONArray("data");
            final int size = list.length();
            ResponseList<Game> games = new ResponseListImpl<Game>(size, json);
            for (int i = 0; i < size; i++) {
                JSONObject gameJSONObject = list.getJSONObject(i);
                Game game = new GameJSONImpl(gameJSONObject);
                if (conf.isJSONStoreEnabled()) {
                    DataObjectFactoryUtil.registerJSONObject(game, gameJSONObject);
                }
                games.add(game);
            }
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.