예제 #1
0
        public string MovePlayer(int desiredCave)
        {
            LocationManager.PlayerMovement(desiredCave);
            PlayerManager.TakeATurn();

            string PositionStatus = LocationManager.CheckPositions();

            if (PositionStatus == "wumpus")
            {
                SoundManager.PlayWumpus();
                bool didWin = TriviaObject.TriviaBattle(5, 3);
                if (didWin)
                {
                    LocationManager.WumpusMoves();
                }
                else
                {
                    EndGameNormally();
                }
            }
            else if (PositionStatus == "pit")
            {
                //trivia
                //sound
                SoundManager.PlayPit();
                bool didWin = TriviaObject.TriviaBattle(3, 1);
                if (didWin)
                {
                    LocationManager.WumpusMoves();
                }
                else
                {
                    EndGameNormally();
                }
                LocationManager.PitsMove();
            }
            else if (PositionStatus == "bat")
            {
                //trivia
                //sound
                SoundManager.PlayBats();
                LocationManager.BatsMove();
                LocationManager.BatFling();
                return("A bat flung you to another room!");
            }

            string Proximity = LocationManager.CheckProximity(CaveManager.GetConnectedList(LocationManager.Player));

            if (Proximity == "wumpus")
            {
                return("The Wumpus is close.");
            }
            else if (Proximity == "pit")
            {
                return("I feel a draft.");
            }
            else if (Proximity == "bat")
            {
                return("Bats are squeaky.");
            }
            else
            {
                return(TriviaObject.GetSecret());
            }

            //get a secret thing and show it
        }