Example #1
0
        private void CreateObjects()
        {
            livingRoom    = new RoomWithDoor("Living Room", "an antique carpet", "inside the closet", "an oak door with a brass handle");
            diningRoom    = new RoomWithHidingPlace("Dining Room", "a crystal chandelier", "in the tall armoire");
            kitchen       = new RoomWithDoor("Kitchen", "stainless steel appliances", "in the cabinet", "a screen door");
            stairs        = new Room("Stairs", "a wooden bannister");
            hallway       = new RoomWithHidingPlace("Upstairs Hallway", "a picture of a dog", "in the closet");
            bathroom      = new RoomWithHidingPlace("Bathroom", "a sink and a toilet", "in the shower");
            masterBedroom = new RoomWithHidingPlace("Master Bedroom", "a large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "a small bed", "under the bed");
            frontYard     = new OutsideWithDoor("Front Yard", false, "a heavy-looking oak door");
            backYard      = new OutsideWithDoor("Back Yard", true, "a screen door");
            garden        = new OutsideWithHidingPlace("Garden", false, "inside the shed");
            driveway      = new OutsideWithHidingPlace("Driveway", true, "in the garage");

            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;
        }
Example #2
0
        public void CreateObjects()
        {
            _frontYard       = new OutsideWithDoor("Front Yard", false, "An Oak Door With A Brass Knob");
            _backYard        = new OutsideWithDoor("Back Yard", true, "A Screen Door");
            _garden          = new OutsideWithHidingPlace("Garden", false, "Shed");
            _livingRoom      = new RoomWithDoor("Living Room", "Antique Carpet", "Behind the TV", "An Oak Door With A Brass Knob");
            _kitchen         = new RoomWithDoor("Kitchen", "Stainless Steel appliances", "Refrigerator", "A Screen Door");
            _diningRoom      = new Room("Dining Room", "Crystal Chandelier");
            _stairs          = new Room("Stairs", "Wooden banister");
            _upstairsHallway = new RoomWithHidingPlace("Upstairs Hallway", "Picture of a Dog", "Closet");
            _masterBedroom   = new RoomWithHidingPlace("Master Bedroom", "Large Bed", "Under the Bed");
            _secondBedroom   = new RoomWithHidingPlace("Second Bedroom", "Small Bed", "Under the Bed");
            _bathroom        = new RoomWithHidingPlace("Bathroom", "Sink and Toilet", "Shower");
            _driveway        = new OutsideWithHidingPlace("Driveway", true, "Garage");

            _frontYard.Exits       = new Location[] { _backYard, _garden, _driveway };
            _backYard.Exits        = new Location[] { _frontYard, _garden, _driveway };
            _garden.Exits          = new Location[] { _frontYard, _backYard };
            _livingRoom.Exits      = new Location[] { _diningRoom, _stairs };
            _kitchen.Exits         = new Location[] { _diningRoom };
            _diningRoom.Exits      = new Location[] { _livingRoom, _kitchen };
            _stairs.Exits          = new Location[] { _livingRoom, _upstairsHallway };
            _upstairsHallway.Exits = new Location[] { _stairs, _masterBedroom, _secondBedroom, _bathroom };
            _masterBedroom.Exits   = new Location[] { _upstairsHallway };
            _secondBedroom.Exits   = new Location[] { _upstairsHallway };
            _bathroom.Exits        = new Location[] { _upstairsHallway };
            _driveway.Exits        = new Location[] { _frontYard, _backYard };

            _frontYard.DoorLocation  = _livingRoom;
            _livingRoom.DoorLocation = _frontYard;
            _backYard.DoorLocation   = _kitchen;
            _kitchen.DoorLocation    = _backYard;

            _opponent = new Opponent(_frontYard);
        }
Example #3
0
        /// <summary>
        /// Initializes all the room objects, sets their exits, and initializes the form.
        /// </summary>
        public void CreateObjects()
        {
            Log.Information("Creating objects now...");

            // Create rooms
            livingRoom = new RoomWithDoor("livingroom", "an antique carpet", "an oak door with a brass knob.", "living room closet");
            Room            diningRoom = new Room("dining room", "a crystal chandelier");
            RoomWithDoor    kitchen    = new RoomWithDoor("kitchen", "stainless steel appliances", "a screen door.", "cabinet");
            OutsideWithDoor backYard   = new OutsideWithDoor("backyard", false, "a screen door");

            frontYard = new OutsideWithDoor("frontyard", true, "an oak door with a brass knob");
            OutsideWithHidingPlace garden = new OutsideWithHidingPlace("Garden", false, "shed");
            Room stairs = new Room("stairs", "a wooden bannister");
            RoomWithHidingPlace    upstairsHallway = new RoomWithHidingPlace("upstairs hallway", "a picture of a dog", "hallway closet");
            RoomWithHidingPlace    masterBedroom   = new RoomWithHidingPlace("master bedroom", "a large bed", "large bed");
            RoomWithHidingPlace    secondBedroom   = new RoomWithHidingPlace("second bedroom", "a small bed", "small bed");
            RoomWithHidingPlace    bathroom        = new RoomWithHidingPlace("bathroom", " a sink and a toilet", "shower");
            OutsideWithHidingPlace driveway        = new OutsideWithHidingPlace("driveway", true, "garage");

            // Set the locations on the other side of doors
            livingRoom.DoorLocation = frontYard;
            kitchen.DoorLocation    = backYard;
            backYard.DoorLocation   = kitchen;
            frontYard.DoorLocation  = livingRoom;

            // Set the exits associated with each room
            driveway.Exits        = new Location[] { frontYard, backYard };
            masterBedroom.Exits   = new Location[] { upstairsHallway };
            secondBedroom.Exits   = new Location[] { upstairsHallway };
            bathroom.Exits        = new Location[] { upstairsHallway };
            upstairsHallway.Exits = new Location[] { stairs, masterBedroom, secondBedroom, bathroom };
            stairs.Exits          = new Location[] { livingRoom, upstairsHallway };
            livingRoom.Exits      = new Location[] { diningRoom, stairs };
            diningRoom.Exits      = new Location[] { livingRoom, kitchen };
            kitchen.Exits         = new Location[] { diningRoom };
            backYard.Exits        = new Location[] { frontYard, garden, driveway };
            frontYard.Exits       = new Location[] { backYard, garden, driveway };
            garden.Exits          = new Location[] { backYard, frontYard };

            // Set the opponents starting position
            opponent = new Opponent(frontYard);

            // Make sure only the Hide! control is visible at the beginning of the game
            check.Visible            = false;
            goHere.Visible           = false;
            exits.Visible            = false;
            goThroughTheDoor.Visible = false;
            hide.Visible             = true;
            LoadNewPict("hideandseek");
        }
Example #4
0
        private void CreateObject()
        {
            livingRoom = new RoomWithDoor("Living Room", "antique capet", "under the capet", "an oak door with a brass knob");
            kitchen    = new RoomWithDoor("Kitchen", "stainless steel appliances", "under the table", "screen door");

            stairs        = new RoomWithHidingPlace("Stairs", "picture of a dog", "closet");
            masterBedroom = new RoomWithHidingPlace("Master Bedroom", "large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "small bed", "under the bed");
            bathroom      = new RoomWithHidingPlace("Bathroom", "sink, toilet, shower", "shower");

            diningRoom      = new Room("Dining Room", "crystal chandelier");
            upstairsHallway = new Room("Upstairs Hallway", "moody light");

            frontYard = new OutsideWithDoor("Front Yard", false, "garage", "an oak door with a brass knob");
            backYard  = new OutsideWithDoor("Back Yard", true, "garage", "screen door");

            garden = new OutsideWithHidingPlace("Garden", false, "shed");

            driveway = new Outside("Driveway", false);

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

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

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

            diningRoom.Exits      = new Location[] { livingRoom, kitchen };
            upstairsHallway.Exits = new Location[] { masterBedroom, secondBedroom, bathroom };

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

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

            backYard.Exits        = new Location[] { garden, driveway };
            backYard.DoorLocation = kitchen;

            driveway.Exits = new Location[] { frontYard, backYard };
        }
Example #5
0
        private void CreateObjects()
        {
            livingRoom = new RoomWithDoor("Salon", "andtyczny dywan",
                                          "w komodzie", "dębowe drzwi");
            diningRoom = new RoomWithHidingPlace("Jadalnia", "złoty świecznik",
                                                 " pod stołem ");
            kitchen = new RoomWithDoor("Kuchnia", "srebrną zastawę",
                                       "pod zlewem", "szklane drzwi");
            stairs  = new Room("Schody", "drewniana szafka");
            hallway = new RoomWithHidingPlace("Poddasze", "zdjęcie kota",
                                              "w szafce");
            bathroom = new RoomWithHidingPlace("Łazienka", "złote krany",
                                               "pod prysznicem");
            masterBedroom = new RoomWithHidingPlace("Główna sypialnia", "ogromne łóżko",
                                                    "pod łóżkiem");
            secondBedroom = new RoomWithHidingPlace("Druga sypialnia", "małe łóżko",
                                                    "pod łóżkiem");

            frontYard = new OutsideWithDoor("Pole przed domem", false, "Dębowe drzwi");
            backYard  = new OutsideWithDoor("Pole za domem", true, "szklane drzwi");
            garden    = new OutsideWithHidingPlace("Pole (ogródek)", false, "w krzakach");
            driveway  = new OutsideWithHidingPlace("Podjazd", true, "w garażu");

            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;
        }
Example #6
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;
 }
Example #7
0
        private void CreateLocations()
        {
            livingRoom = new RoomWithDoor("Living Room", "an antique carpet", "inside the closet", "an oak door with a brass knob");
            diningRoom = new RoomWithHidingPlace("Dining Room", "a chrystal chandelier", "in the tall armoire");
            kitchen = new RoomWithDoor("Kitchen", "stainles steel appliances", "in the cabinet", "a screen door");
            stairs = new Room("Stairs", "a wooden bannister");
            hallway = new RoomWithHidingPlace("Upstairs Hallway", "a picture of a dog", "in the closet");
            bathroom = new RoomWithHidingPlace("Bathroom", "a sink and a toilet", "in the shower");
            masterBedroom = new RoomWithHidingPlace("Master Bedroom", "a large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "a small bed", "under the bed");

            frontYard = new OutsideWithDoor("Front Yard", false, "an oak door with a brass knob");
            backYard = new OutsideWithDoor("Back Yard", true, "a screen door");
            garden = new OutsideWithHidingPlace("Garden", false, "inside the shed");
            driveway = new OutsideWithHidingPlace("Driveway", false, "in the garage");

            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[] { frontYard, backYard };
            driveway.Exits = new Location[] { frontYard, backYard };

            livingRoom.DoorLocation = frontYard;
            frontYard.DoorLocation = livingRoom;
            kitchen.DoorLocation = backYard;
            backYard.DoorLocation = kitchen;
        }