Esempio n. 1
0
        static void Main(string[] args)
        {
            Board   board     = new Board();
            Players players   = new Players();
            bool    progress  = false;
            bool    isVictory = false;

            while (!isVictory)
            {
                board.Display();
                int activePlayer = players.GetActivePlayer();
                while (!progress)
                {
                    char input = Console.ReadKey().KeyChar;
                    progress = board.HandleInput(input, activePlayer);
                }
                progress  = false;
                isVictory = board.CheckVictory();
                players.ChangeActivePlayer();
            }
            Console.ReadKey();
        }