Examples of GameState


Examples of it.timehero.example.slick.timehero.states.GameState

   */
  public void initStatesList(GameContainer container) {
    //TODO: attivare qui gli stati per riavere i menu!
    addState(new MenuState());
    addState(new HeroCreationState());
    addState(new GameState());
    addState(new MenuPauseState());
  }
View Full Code Here

Examples of it.timehero.slick.states.GameState

   */
  public void initStatesList(GameContainer container) {
    Log.info("initStatesList");
    //addState(new MenuState());
    //addState(new HeroCreationState());
    addState(new GameState());
    addState(new MenuPauseState());
  }
View Full Code Here

Examples of it.timehero.slick.states.GameState

  public void initStatesList(GameContainer container) {
    Log.info("initStatesList");
    //TODO: attivare qui gli stati per riavere il menu principale e quello di creazione pg
    //addState(new MenuState());
    //addState(new HeroCreationState());
    addState(new GameState());
    addState(new MenuPauseState());
  }
View Full Code Here

Examples of it.timehero.slick.states.GameState

  public void initStatesList(GameContainer container) {
    Log.info("initStatesList");
    //TODO: attivare qui gli stati per riavere il menu principale e quello di creazione pg
    addState(new MenuState());
    addState(new HeroCreationState());
    addState(new GameState());
    addState(new MenuPauseState());
  }
View Full Code Here

Examples of jimmm.data.GameState

//    mainFrame.setLayout(new BoxLayout(mainFrame, BoxLayout.Y_AXIS));
    mainFrame.setLayout(new GridLayout(4, 1));
   
    GameOptions go = new GameOptions();
      go.initialCardsPerPlayer = 5;
    GameState gs = new GameState( new ArrayList<Player>(Arrays.asList(p1,p2)), go);
   
    TooSimpleHandRenderer h1 = new TooSimpleHandRenderer(p1, gs);
    TooSimpleHandRenderer h2 = new TooSimpleHandRenderer(p2,gs);
    TooSimpleChooser cr = new TooSimpleChooser(gs);
    TooSimpleDeckRenderer dr = new TooSimpleDeckRenderer(gs);
View Full Code Here

Examples of minesweeper.ai.games.GameState

    }
   
    System.out.print("\nEasy\t");
    int[] wins = new int[players.length];
    for(int i=0; i<1000; i++) {
      GameState game = NativeGameState.createEasyGame();
      for(int p=0; p<players.length; p++) {
        players[p].solve(game);
        if(game.getState()==State.WIN) wins[p]++;
        game.restart();
      }
    }
    for(int w : wins) System.out.print("\t\t"+w);
   
    System.out.print("\nIntermediate");
    wins = new int[players.length];
    for(int i=0; i<1000; i++) {
      GameState game = NativeGameState.createIntermediateGame();
      for(int p=0; p<players.length; p++) {
        players[p].solve(game);
        if(game.getState()==State.WIN) wins[p]++;
        game.restart();
      }
    }
    for(int w : wins) System.out.print("\t\t"+w);
   
    System.out.print("\nAdvanced");
    wins = new int[players.length];
    for(int i=0; i<1000; i++) {
      GameState game = NativeGameState.createAdvancedGame();
      for(int p=0; p<players.length; p++) {
        players[p].solve(game);
        if(game.getState()==State.WIN) wins[p]++;
        game.restart();
      }
    }
    for(int w : wins) System.out.print("\t\t"+w);
   
    System.out.println("\n"+(System.currentTimeMillis()-t0));
View Full Code Here

Examples of minesweeper.ai.games.GameState

 
  public static void evaluateAI(AIPlayer player, int trials) {
    System.out.println("Evaluation of " + player);
    int[][] results = new int[3][2]; //[easy/med/adv][win/lose]
    for(int i=0; i < trials; i++) {
      GameState game = NativeGameState.createEasyGame();
      player.solve(game);
      results[0][game.getState()==State.WIN?0:1]++;
    }
    System.out.println("Easy: ");
    System.out.println("\tWins: " + results[0][0] + "\n\tLosses: " + results[0][1]);
    for(int i=0; i < trials; i++) {
      GameState game = NativeGameState.createIntermediateGame();
      player.solve(game);
      results[1][game.getState()==State.WIN?0:1]++;
    }
    System.out.println("Intermediate: ");
    System.out.println("\tWins: " + results[1][0] + "\n\tLosses: " + results[1][1]);
    for(int i=0; i < trials; i++) {
      GameState game = NativeGameState.createAdvancedGame();
      player.solve(game);
      results[2][game.getState()==State.WIN?0:1]++;
    }
    System.out.println("Advanced: ");
    System.out.println("\tWins: " + results[2][0] + "\n\tLosses: " + results[2][1]);
  }
View Full Code Here

Examples of minesweeper.ai.games.GameState

public class MinesweeperApplication {
 
  public static void main(String... args) throws IOException, InterruptedException {
   
    GameState game = Windows7GameState.createAdvancedGame();
   
    AIPlayer player = new ProbablisticSearchTreeAI(DebugMode.ON);
    player.solve(game);
    Thread.sleep(3333);
    System.out.println(game.getState());
   
  }
View Full Code Here

Examples of nfc.sample.tictactoe.game.GameState

public class SelectTileCommand extends AlwaysExecutableCommand {
   
    private int _symbol;
   
  public void execute(ReadOnlyCommandMetadata metadata, Object context) {
      GameState game_state = GameState.getInstance();
      if (game_state.isBoardLocked()) {
          return;
      }
      if (context instanceof MultiStateButtonField) {
          int current_tile = game_state.getCurrent_tile();
          game_state.updateTileThisPlayer(current_tile,_symbol);
      }
  }
View Full Code Here

Examples of org.cspoker.client.common.gamestate.GameState

        && gameState.getLargestBet() <= gameState
            .getTableConfiguration().getBigBlind()) {
      roundEnds = false;
    }

    GameState foldState = getUnwrappedStateAfterAction();

    if (!roundEnds) {
      return new NextPlayerState(foldState, new NextPlayerEvent(foldState
          .getNextActivePlayerAfter(actor).getPlayerId()));
    }
    return getNewRoundState(foldState);
  }
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.