public override void planMove(JokerGame game) { char[,] board = game.getBoard(); List <JokerPoint> list = new List <JokerPoint>(); for (int i = 0; i < game.getHeight(); i++) { for (int j = 0; j < game.getWidth(); j++) { if (board[i, j] == '*') { list.Add(new JokerPoint(i, j)); } } } JokerPoint randomMove = list[rand.Next(list.Count)]; while (!list.isEmpty()) { if (makeMove(game, randomMove)) { return; } } }
public override void planMove(JokerGame game) { if (influence == null) { initInfluenceMap(game.getHeight()); } boardCopy = game.getBoardCopy(); this._maxDepth = game.getWidth() + 1; alphabeta(this._maxDepth, -INF, INF, getColor()); makeMove(game, bestMove); }