Beispiel #1
0
        static void Main()
        {
            Map              map             = new Map();
            Party            party           = new Party();
            List <Character> characters      = Character.CreateCharacters();
            Place            visitorLocation = map.Locations.Find(location => location.Name == "Visitor Center");
            bool             gameOver        = false;
            bool             isVictorious    = false;
            Character        visitor         = Welcome();

            party.AddCharacter(visitor);
            Intro();
            while (!gameOver)
            {
                Place.VisitorCenterEvents(visitorLocation, party, characters);
                Place.UtilityBunkerEvents(visitorLocation, party, characters);
                Place.RadioStationEvents(visitorLocation, party);
                Place.HerbivorePenEvents(visitorLocation, party, characters);
                Place.ParkOperationsEvents(visitorLocation, party, characters);
                Place.BoatDockEvents(visitorLocation, party);
                Place.HeliPadEvents(visitorLocation, party);
                Place.PathEvents(visitorLocation, party, characters);
                // Other Event "Listeners"
                gameOver = visitorLocation.CanLeave(party);
                if (!gameOver)
                {
                    visitorLocation = UserDirection(party, map, visitorLocation);
                    gameOver        = CheckForEnd(visitor);
                }
                else
                {
                    isVictorious = true;
                }
            }
            EndGame(isVictorious);
        }