Exemplo n.º 1
0
        public void PlacePenguin()
        {
            // Place a penguin on the map for the IA :
            // We try to place the penguin near a 3 fish point
            var availableCells = Board.GetAvailableCellsAroundA3FishCell();

            var selectedCell = availableCells[random.Next(0, availableCells.Count)];

            game.PlacePenguinManual(selectedCell.X, selectedCell.Y);
        }
Exemplo n.º 2
0
        public void PlacePenguin()
        {
            // Place a penguin on the map for the IA :
            var nextX = random.Next(0, 8);
            var nextY = random.Next(0, 8);

            while (!Board.CanPlacePenguin(nextX, nextY))
            {
                nextX = random.Next(0, 8);
                nextY = random.Next(0, 8);
            }

            game.PlacePenguinManual(nextX, nextY);
        }