コード例 #1
0
        public void GameStateCheck()
        {
            //check possible game outcomes

            //check bomb
            BombCheck();

            if (Game.Lives == 0)
            {
                SetGameOver();
                _messageProcessor.Pause();
                //it's over I'm afraid
            }

            if (Game.XPosition == _gameOptions.GridSize - 1)
            {
                SetGameSuccess();
                _messageProcessor.Pause();
                //legend
            }

            if (!Game.GameEnded)
            {
                _messageProcessor.PrintMessage($"Position: {GameHelper.CurrentXPositionLetter(Game.XPosition)}{Game.YPosition + 1}\tLives:{Game.Lives}\tBombs hit/remaining: {Game.BombsHit }/{_gameOptions.BombCount - Game.BombsHit}\tScore: {Game.Score}", ConsoleColor.White);
                //set message
                //play on
            }
        }