get() public méthode

public get ( String key ) : Object
key String
Résultat Object
Exemple #1
0
        public void makeMiniMaxMove()
        {
            getMiniMaxValue(presentState);
            GameState nextState = (GameState)presentState.get("next");

            if (nextState == null)
            {
                throw new RuntimeException("Mini Max Move failed");
            }
            makeMove(presentState, nextState.get("moveMade"));
        }
Exemple #2
0
	public TicTacToeBoard getBoard(GameState state) {

		return (TicTacToeBoard) state.get("board");
	}
Exemple #3
0
	public override bool terminalTest(GameState state) {
		TicTacToeBoard board = (TicTacToeBoard) state.get("board");
		bool line = board.lineThroughBoard();
		bool filled = board.getNumberOfMarkedPositions() == 9;
		return (line || filled);
	}
Exemple #4
0
	public override int computeUtility(GameState state) {
		int utility = computeUtility((TicTacToeBoard) state.get("board"),
				(getPlayerToMove(state)));
		return utility;
	}
Exemple #5
0
 public int getUtility(GameState h)
 {
     return(((int)h.get("utility")).intValue());
 }
Exemple #6
0
 public String getPlayerToMove(GameState state)
 {
     return((String)state.get("player"));
 }
Exemple #7
0
 public List getMoves(GameState state)
 {
     return((List)state.get("moves"));
 }
Exemple #8
0
 public int getLevel(GameState g)
 {
     return(((int)g.get("level")).intValue());
 }
Exemple #9
0
 public int getUtility(GameState h)
 {
     return ((int)h.get("utility")).intValue();
 }
Exemple #10
0
 public String getPlayerToMove(GameState state)
 {
     return (String)state.get("player");
 }
Exemple #11
0
 public List getMoves(GameState state)
 {
     return (List)state.get("moves");
 }
Exemple #12
0
 public int getLevel(GameState g)
 {
     return (((int)g.get("level")).intValue());
 }