private static void CreateObjects()
        {
            DiningRoom    = new Room("Jadalnia", "Błyszczący żyrandol");
            Garden        = new OutsideWithHidingLocation("Ogród", false, "Na drzewie");
            Frontyard     = new OutsideWithDoor("Podwórze frontowe", true, "Małe ze sklejki bez zamka", "W żywopłocie");
            Backyard      = new OutsideWithDoor("Podwórze z tyłu", true, "Wielkie dębowe z mosiężną klamką", "Za płotem");
            Kitchen       = new RoomWithDoor("Kuchnia", "Nierdzerwne błyszczące sztucznie  i ", "Małe ze sklejki bez zamka", "w szafie ściennej");
            LivingRoom    = new RoomWithDoor("Salon", "Dywan perski", "Wielkie dębowe z mosiężną klamką", "za łóżkiem");
            Stairs        = new Room("Schody", "Drewniania poręcz");
            Hallway       = new RoomWithHidingPlace("Korytarz", "Obrazek z psem", "W szafie ściennej");
            MasterBedroom = new RoomWithHidingPlace("Duża sypalnia", "Duże łóżko", "Pod łóżkiem");
            SecondBedroom = new RoomWithHidingPlace("Druga sypalnia", "Małe łóżko", "Pod łóżkiem");
            Bathroom      = new RoomWithHidingPlace("Łazienka", "Umywalka i toaleta", "Pod  prysznicem");
            DriveWay      = new OutsideWithHidingLocation("Droga dojazdowa", true, "W garażu");

            myOpponent = new Opponent(Frontyard);


            Garden.Exits     = new Location[] { Frontyard, Backyard };
            Frontyard.Exits  = new Location[] { Garden, LivingRoom };
            Backyard.Exits   = new Location[] { Kitchen, Garden };
            Kitchen.Exits    = new Location[] { Backyard, DiningRoom };
            DiningRoom.Exits = new Location[] { Kitchen, LivingRoom };
            LivingRoom.Exits = new Location[] { DiningRoom, Frontyard };
            Stairs.Exits     = new Location[] { LivingRoom, Hallway };
            Hallway.Exits    = new Location[] { MasterBedroom, SecondBedroom, Bathroom };

            Frontyard.DoorLocation  = LivingRoom;
            LivingRoom.DoorLocation = Frontyard;

            Backyard.DoorLocation = Kitchen;
            Kitchen.DoorLocation  = Backyard;
        }
示例#2
0
        public void InitializeGame()
        {
            // inside
            diningRoom    = new Room("Dining Room", "a crystal chandelier");
            stairs        = new Room("Stairs", "a wooden bannister");
            kitchen       = new RoomWithDoor("Kitchen", "stainless steel appliances", "on top of fridge", "screen door");
            livingRoom    = new RoomWithDoor("Living Room", "an antique carpet", "under the sofa", "an oak door with a brass knob");
            hallway       = new RoomWithHidingPlace("Upstairs hallway", "a picture of a dog", "in the closet");
            masterBedroom = new RoomWithHidingPlace("Master Bedroom", "a large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "a small bad", "under the bed");
            bathroom      = new RoomWithHidingPlace("Bathroom", "a sink and a toilette", "in the shower");

            // outside
            frontYard = new OutsideWithDoor("Front Yard", false, "an oak door with a brass knob");
            backYard  = new OutsideWithDoor("Back Yard", true, "screen door");
            garden    = new OutsideWithHidingPlace("Garden", false, "in the sheed");
            driveaway = new OutsideWithHidingPlace("Driveaway", false, "in the garage");

            diningRoom.Exits = new Location[] { livingRoom, kitchen };

            kitchen.Exits        = new Location[] { diningRoom };
            kitchen.DoorLocation = backYard;

            livingRoom.Exits        = new Location[] { diningRoom, stairs };
            livingRoom.DoorLocation = frontYard;

            stairs.Exits        = new Location[] { livingRoom, hallway };
            hallway.Exits       = new Location[] { stairs, bathroom, masterBedroom, secondBedroom };
            bathroom.Exits      = new Location[] { hallway };
            masterBedroom.Exits = new Location[] { hallway };
            secondBedroom.Exits = new Location[] { hallway };

            garden.Exits    = new Location[] { backYard, frontYard };
            driveaway.Exits = new Location[] { backYard, frontYard };

            frontYard.Exits        = new Location[] { garden, backYard, driveaway };
            frontYard.DoorLocation = livingRoom;

            backYard.Exits        = new Location[] { garden, frontYard, driveaway };
            backYard.DoorLocation = kitchen;
        }
示例#3
0
 private void CreateObjects()
 {
     livingRoom = new RoomWithDoor("Гостиная", "старинный ковер",
                                   "в гардеробе", "дубовая дверь с латунной ручкой");
     diningRoom = new RoomWithHidingPlace("Столовая", "хрустальная люстра",
                                          "в высоком шкафу");
     kitchen = new RoomWithDoor("Кухня", "приборы из нержавеющей стали",
                                "в сундуке", "сетчатая дверь");
     stairs  = new Room("Лестница", "деревянные перила");
     hallway = new RoomWithHidingPlace("Верхний коридор", "картина с собакой",
                                       "в гардеробе");
     bathroom = new RoomWithHidingPlace("Ванная", "раковина и туалет",
                                        "в душе");
     masterBedroom = new RoomWithHidingPlace("Главная спальня", "большая кровать",
                                             "под кроватью");
     secondBedroom = new RoomWithHidingPlace("Вторая спальня", "маленькая кровать",
                                             "под кроватью");
     frontYard               = new OutsideWithDoor("лужайка", false, "тяжелая дубовая дверь");
     backYard                = new OutsideWithDoor("Задний двор", true, "сетчатая дверь");
     garden                  = new OutsideWithHidingPlace("Сад", false, "в сарае");
     driveway                = new OutsideWithHidingPlace("Подъезд", true, "в гараже");
     diningRoom.Exits        = new Location[] { livingRoom, kitchen };
     livingRoom.Exits        = new Location[] { diningRoom, stairs };
     kitchen.Exits           = new Location[] { diningRoom };
     stairs.Exits            = new Location[] { livingRoom, hallway };
     hallway.Exits           = new Location[] { stairs, bathroom, masterBedroom, secondBedroom };
     bathroom.Exits          = new Location[] { hallway };
     masterBedroom.Exits     = new Location[] { hallway };
     secondBedroom.Exits     = new Location[] { hallway };
     frontYard.Exits         = new Location[] { backYard, garden, driveway };
     backYard.Exits          = new Location[] { frontYard, garden, driveway };
     garden.Exits            = new Location[] { backYard, frontYard };
     driveway.Exits          = new Location[] { backYard, frontYard };
     livingRoom.DoorLocation = frontYard;
     frontYard.DoorLocation  = livingRoom;
     kitchen.DoorLocation    = backYard;
     backYard.DoorLocation   = kitchen;
 }