Ejemplo n.º 1
0
        private void CreateObjects()
        {
            livingRoom    = new RoomWithDoor("Living Room", "an antique carpet", "inside the closet", "an oak door with a brass knob");
            frontYard     = new OutsideWithDoor("Front Yard", false, "an oak door with a brass knob");
            garden        = new OutsideWithHidingPlace("Garden", false, "inside the shed");
            backYard      = new OutsideWithDoor("Back yard", true, "a screen door");
            diningRoom    = new RoomWithHidingPlace("Dining room", "chrystal 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");
            driveway      = new OutsideWithHidingPlace("Driveway", true, "in the garage");

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


            //For the IHasExteriorDoor object, we need to set where their door goes to
            livingRoom.DoorLocation = frontYard;
            backYard.DoorLocation   = kitchen;
            frontYard.DoorLocation  = livingRoom;
            kitchen.DoorLocation    = backYard;
        }
Ejemplo n.º 2
0
        public void CreateObjects()
        {
            DiningRoom      = new Room("Dining Room", "a glass chandelier");
            Stairs          = new Room("Second Story Stairs", "a wooden banister");
            LivingRoom      = new RoomWithDoor("Living Room", "an antique carpet", "a wooden door with an old brass knob");
            FrontYard       = new OutsideWithDoor("Front Yard", "a wooden door", false);
            BackYard        = new OutsideWithDoor("Back Yard", "a screen door", true);
            Kitchen         = new RoomWithHidingPlaceAndDoor("Kitchen", "a complete cabinet set", " a glass door", "in a cabinet");
            Bathroom        = new RoomWithHidingPlace("Bathroom", " a sink and a toilet", "in the shower");
            MasterBedroom   = new RoomWithHidingPlace("Master Bedroom", "a large bed", "under the large bed");
            SecondBedroom   = new RoomWithHidingPlace("Second Bedroom", "a small bed", "under the small bed");
            UpstairsHallway = new RoomWithHidingPlace("Upstairs Hallway", "a picture of a dog", "in the hall closet");
            Driveway        = new OutsideWithHidingPlace("Driveway", false, "in the garage");
            Garden          = new OutsideWithHidingPlace("Garden", false, "in a shed");

            DiningRoom.Exits = new Location[2] {
                LivingRoom, Kitchen
            };
            Stairs.Exits = new Location[2] {
                LivingRoom, UpstairsHallway
            };
            LivingRoom.Exits = new Location[2] {
                DiningRoom, Stairs
            };
            FrontYard.Exits = new Location[3] {
                Garden, BackYard, Driveway
            };
            BackYard.Exits = new Location[3] {
                Garden, FrontYard, Driveway
            };
            Kitchen.Exits = new Location[1] {
                DiningRoom
            };
            Bathroom.Exits = new Location[1] {
                UpstairsHallway
            };
            MasterBedroom.Exits = new Location[1] {
                UpstairsHallway
            };
            SecondBedroom.Exits = new Location[1] {
                UpstairsHallway
            };
            UpstairsHallway.Exits = new Location[4] {
                Stairs, MasterBedroom, SecondBedroom, Bathroom
            };
            Driveway.Exits = new Location[2] {
                FrontYard, BackYard
            };
            Garden.Exits = new Location[2] {
                FrontYard, BackYard
            };

            LivingRoom.DoorLocation = FrontYard;
            FrontYard.DoorLocation  = LivingRoom;

            Kitchen.DoorLocation  = BackYard;
            BackYard.DoorLocation = Kitchen;
        }
Ejemplo n.º 3
0
        public void CreateObject()
        {
            garden    = new OutsideWithHidingPlace("Garden", false, "inside the shed");
            frontYard = new OutsideWithDoor("FrontYard", false, "an heavy-looking oak door");
            backYard  = new OutsideWithDoor("BackYard", true, "a screen door");
            driveway  = new OutsideWithHidingPlace("Driveway", true, "in the garage");

            diningRoom    = new RoomWithHidingPlace("DiningRoom", "a crystal chandelier", "in the tall armoire");
            livingRoom    = new RoomWithDoor("Living Room", "an antique carpet", "inside the closet", "an oak door with a brass knob");
            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 dog", "in the closet");
            bathroom      = new RoomWithHidingPlace("Bathroom", "a sink and a toilet", "in the shower");
            masterBedroom = new RoomWithHidingPlace("MasterBedroom", "a large bed", "under the bed");
            secondBedroom = new RoomWithHidingPlace("Second Bedroom", "a small bed", "under the bed");


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

            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 };

            livingRoom.DoorLocation = frontYard;
            frontYard.DoorLocation  = livingRoom;

            kitchen.DoorLocation  = backYard;
            backYard.DoorLocation = kitchen;

            opponent = new Opponent(frontYard);

            checkButton.Visible            = false;
            goHereButton.Visible           = false;
            exits.Visible                  = false;
            goThroughTheDoorButton.Visible = false;

            Moves = 0;
        }
Ejemplo n.º 4
0
        private void CreateObjects()
        {
            Garden = new OutsideWithHidingPlace("Garden", false, "inside the shed");
            FrontYard = new OutsideWithDoor("Front Yard", false, "a heavy looking oak door");
            BackYard = new OutsideWithDoor("Back Yard", true, "a screen door");
            LivingRoom = new RoomWithDoor("Living Room", "antique carpet", "an oak door with a brass handle", "in the closet");
            Kitchen = new RoomWithDoor("Kitchen", "stainless steel appliances", "a screen door", "in the cabinet");
            DiningRoom = new RoomWithHidingPlace("Dining Room", "a crystal chandelier", "in the tall armoire");

            // Added 2/8/16
            Stairs = new Room("Stairs", "a wooden bannister");
            UpstairsHallway = 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 bed", "under the bed");
            Bathroom = new RoomWithHidingPlace("Bathroom", "a sink and a toilet", "in the shower");
            Driveway = new OutsideWithHidingPlace("Driveway", false, "in the garage");

            Garden.Exits = new Location[] { FrontYard, BackYard };
            FrontYard.Exits = new Location[] { BackYard, Garden, Driveway };
            BackYard.Exits = new Location[] { FrontYard, Garden, Driveway };
            LivingRoom.Exits = new Location[] { DiningRoom, Stairs };
            Kitchen.Exits = new Location[] { DiningRoom };
            DiningRoom.Exits = new Location[] { LivingRoom, Kitchen };

            //Added 2/8/16
            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 };


            LivingRoom.DoorLocation = FrontYard;
            FrontYard.DoorLocation = LivingRoom;

            Kitchen.DoorLocation = BackYard;
            BackYard.DoorLocation = Kitchen;
        }
Ejemplo n.º 5
0
        private void CreateObjects()
        {
            livingRoom = new RoomWithDoor("Living Room", "an antique carpet", "an oak door with a brass knob", "inside the closet");
            kitchen = new RoomWithDoor("Kitchen", "stainless steel appliances", "a screen door", "in the cabinet");
            diningRoom = new RoomWithHidingPlace("Dining Room", "a crystal chandelier", "in the tall armoire");
            stairs = new Room("Stairs", "a wooden bannister");
            upstairsHallway = 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 bed", "under the bed");
            bathroom = new RoomWithHidingPlace("Bathroom", "a sink and a toilet", "in the shower");

            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");

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

            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;

            opponent = new Opponent(frontYard);
        }
Ejemplo n.º 6
0
        private void CreateObjects()
        {
            livingRoom      = new RoomWithDoor("Living Room", "an antique carpet", "an oak door with a brass knob", "inside the closet");
            kitchen         = new RoomWithDoor("Kitchen", "stainless steel appliances", "a screen door", "in the cabinet");
            diningRoom      = new RoomWithHidingPlace("Dining Room", "a crystal chandelier", "in the tall armoire");
            stairs          = new Room("Stairs", "a wooden bannister");
            upstairsHallway = 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 bed", "under the bed");
            bathroom        = new RoomWithHidingPlace("Bathroom", "a sink and a toilet", "in the shower");

            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");

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

            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;

            opponent = new Opponent(frontYard);
        }