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; } } }