Пример #1
0
        // Main game loop that runs until the game is over.
        private void Play()
        {
            EndState endState;

            do
            {
                _map.Update();
                string command = GetValidResponse(Message.ActionPrompt, new HashSet <string> {
                    "S", "M", "Q"
                });
                endState = _map.GetEndState(command);
            } while (!endState.IsGameOver);

            endState.Print();
        }