public override bool terminalTest(GameState state) { TicTacToeBoard board = (TicTacToeBoard) state.get("board"); bool line = board.lineThroughBoard(); bool filled = board.getNumberOfMarkedPositions() == 9; return (line || filled); }