private void CreateObjects() { livingRoom = new RoomWithDoor("an antique carpet", "Living Room", "an oak door with a brass knob"); diningRoom = new Room( "a crystal chandelier","Dining Room"); kitchen = new RoomWithDoor("stainless steel appliances", "Kitchen", "a screen door"); frontYard = new OutsideWithDoor(false, "Front Yard", "an oak door with a brass knob"); backYard = new OutsideWithDoor(true, "Back Yard", "a screen door"); garden = new Outside(false,"Garden"); diningRoom.Exits = new Location[] { livingRoom, kitchen }; livingRoom.Exits = new Location[] { diningRoom }; kitchen.Exits = new Location[] { diningRoom }; frontYard.Exits = new Location[] { backYard, garden }; backYard.Exits = new Location[] { frontYard, garden }; garden.Exits = new Location[] { backYard, frontYard }; livingRoom.location = frontYard; frontYard.location= livingRoom; kitchen.location = backYard; backYard.location = kitchen; }
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; }
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); }
private void CreateLocations() { livingRoom = new RoomWithDoor("Living Room", "an antique carpet", "an oak door with a brass knob"); diningRoom = new Room("Dining Room", "a chrystal chandelier"); kitchen = new RoomWithDoor("Kitchen", "stainles steel appliances", "a screen door"); frontYard = new OutsideWithDoor("Front Yard", false, "an oak door with a brass knob"); backYard = new OutsideWithDoor("Back Yard", true, "a screen door"); garden = new Outside("Garden", false); diningRoom.Exits = new Location[] { livingRoom, kitchen }; livingRoom.Exits = new Location[] { diningRoom }; kitchen.Exits = new Location[] { livingRoom }; frontYard.Exits = new Location[] { garden }; backYard.Exits = new Location[] { garden }; garden.Exits = new Location[] { frontYard, backYard }; livingRoom.DoorLocation = frontYard; frontYard.DoorLocation = livingRoom; kitchen.DoorLocation = backYard; backYard.DoorLocation = kitchen; }