Examples of TicTacToeBoard


Examples of aima.core.environment.tictactoe.TicTacToeBoard

          for (int i = 0; i < 9; i++)
            if (ae.getSource() == squares[i])
              game.makeMove(i / 3, i % 3);
        }
      }
      TicTacToeBoard board = (TicTacToeBoard) game.getState().get("board");
      for (int i = 0; i < 9; i++) {
        String val = board.getValue(i / 3, i % 3);
        if (val == TicTacToeBoard.EMPTY)
          val = "";
        squares[i].setText(val);
      }
      GameState state = game.getState();
View Full Code Here

Examples of aima.core.environment.tictactoe.TicTacToeBoard

      System.out.println("\n" + t4.getPlayerToMove(t4.getState())
          + "  playing ... ");

      t4.makeAlphaBetaMove();
      GameState presentState = t4.getState();
      TicTacToeBoard board = t4.getBoard(presentState);
      board.print();
    }
    System.out.println("ALPHA BETA DEMO done");
  }
View Full Code Here

Examples of aima.core.environment.tictactoe.TicTacToeBoard

      System.out.println("\n" + t3.getPlayerToMove(t3.getState())
          + " playing");
      System.out.println("");
      t3.makeMiniMaxMove();
      GameState presentState = t3.getState();
      TicTacToeBoard board = t3.getBoard(presentState);
      System.out.println("");
      board.print();

    }
    System.out.println("Mini MAX DEMO done");
  }
View Full Code Here

Examples of aima.core.environment.tictactoe.TicTacToeBoard

  private TicTacToeBoard tb;

  @Before
  public void setUp() {
    tb = new TicTacToeBoard();
  }
View Full Code Here

Examples of aima.core.environment.tictactoe.TicTacToeBoard

    checkSuccessorList(successors3, "O", 6);
  }

  @Test
  public void testGameStateEquality() {
    TicTacToeBoard tb1 = new TicTacToeBoard();
    TicTacToeBoard tb2 = new TicTacToeBoard();
    GameState gs1 = new GameState();
    GameState gs2 = new GameState();
    gs1.put("board", tb1);
    gs2.put("board", tb2);
    Assert.assertEquals(gs1, gs2);
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.game.TicTacToeBoard

  /**
   * creates TicTacToeBoard and adds it to the world.
   */
  private void addBoard() {
    board = new TicTacToeBoard();
    board.setPosition(87, 111);
    zone.add(board);
    board.addToWorld();
  }
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.