Example #1
0
        public static void Test(List <Board> boards)
        {
            var index = 0;

            while (true)
            {
                Console.Clear();
                Console.WriteLine(boards[index].ToString(true));
                mySolver.Get(boards[index]);

                var key = Console.ReadKey();

                if (key.Key == ConsoleKey.RightArrow)
                {
                    if (index < boards.Count)
                    {
                        index++;
                    }
                }
                else if (key.Key == ConsoleKey.LeftArrow)
                {
                    if (index > 0)
                    {
                        index--;
                    }
                }
            }
        }
Example #2
0
        public static string Get(Board gameBoard)
        {
            boards.Add(gameBoard);
            if (boards.Count == maxTickLog)
            {
                boards.RemoveAt(0);
            }
            if (gameBoard.IsMyBombermanDead)
            {
                WriteLog();
            }

            return(game.Get(gameBoard));
        }