Example #1
0
        private void createLocations()
        {
            startUp =
                new Location("an office with paper strewn everywhere, how anyone works effectively here is a mystery",
                    "Julies Office");
            Location lounge =
                new Location("an open space containing comfortable looking couches and artwork of dubious quality",
                    "Airport Lounge");
            Shop shop = new Shop("Some shop", "Shop");
            Location t127 = new Location("a lecture theatre", "T127");
            Location gregsoffice = new Location("a spinning vortex of terror", "Greg's Office");

            startUp.AddExit("south", new Exit("you see an open space to the south", lounge));
            lounge.AddExit("north", new Exit("you see a mound of paper to the north", startUp));
            startUp.AddExit("east", new Exit("you see a shop in the east", shop));
            shop.AddExit("west", new Exit("you see a mound of paper to the west", startUp));

            Key gregKey = new Key(10, 5, "Key Greg's office");
            Key dummyKey = new Key(5, 5, "Dumb key");
            shop.Items.Add("gregkey", gregKey);
            shop.Items.Add("dummykey", dummyKey);

            startUp.AddExit("west", new Exit("you see a terrifying office to the west", gregsoffice));
            gregsoffice.AddExit("east", new Exit("you see a mound of paper to the east", startUp));

            t127.AddExit("south", new Exit("you see a mound of paper to the south", startUp));
            startUp.AddExit("north", new Exit("you see a bleak place to the north", t127));

            lounge.AddExit("northwest", new Exit("you see a terrifying office to the northwest", gregsoffice));
            gregsoffice.AddExit("southeast", new Exit("you see an open space to the southeast", lounge));

            gregsoffice.Locked = true;
            gregKey.Location = gregsoffice;
        }
Example #2
0
        private void CreateLocations()
        {
            startUp =
                new Location("an office with paper strewn everywhere, how anyone works effectively here is a mystery",
                    "Julies Office");
            lounge =
                new Location("an open space containing comfortable looking couches and artwork of dubious quality",
                    "Airport Lounge");

            Shop shop = new Shop("Some shop", "Shop");

            t127 = new Location("a lecture theatre", "T127");
            gregsOffice = new Location("a spinning vortex of terror", "Greg's Office");
            evansCave = new Shop("a crowded room full of technology related stuff", "Crazy Evan's Discount Technology");

            startUp.ExitCollection.AddExit("south", new Exit("you see an open space to the south", lounge));
            startUp.ExitCollection.AddExit("west", new Exit("you see a terrifying office to the west", gregsOffice));
            startUp.ExitCollection.AddExit("north", new Exit("you see a bleak place to the north", t127));

            lounge.ExitCollection.AddExit("north", new Exit("you see a mound of paper to the north", startUp));
            lounge.ExitCollection.AddExit("northwest", new Exit("you see a terrifying office to the northwest", gregsOffice));
            startUp.ExitCollection.AddExit("east", new Exit("you see a shop in the east", shop));
            shop.ExitCollection.AddExit("west", new Exit("you see a mound of paper to the west", startUp));

            t127.ExitCollection.AddExit("south", new Exit("you see a mound of paper to the south", startUp));

            gregsOffice.ExitCollection.AddExit("east", new Exit("you see a mound of paper to the east", startUp));
            gregsOffice.ExitCollection.AddExit("southeast", new Exit("you see an open space to the southeast", lounge));
            gregsOffice.ExitCollection.AddExit("west",
                new Exit("you see shiny stuff to the west.. it looks outdated, retro even", evansCave));

            evansCave.ExitCollection.AddExit("east", new Exit("you see a terrifying office to the east", gregsOffice));

            Key gregKey = new Key("gregkey", 10, 5, "Key Greg's office");
            Key dummyKey = new Key("dummykey",5, 5, "Dumb key");
            shop.Items.AddItem( gregKey);
            shop.Items.AddItem(dummyKey);
            gregsOffice.Locked = true;
            gregKey.Location = gregsOffice;
            lounge.CharacterList.Add("Fred", new NonPlayerCharacter("Fred"));
        }