示例#1
0
        private void CreateObjects()
        {
            livingRoom  = new RoomWithDoor("Sala de Estar", "um carpete antigo", "dentro do closet", "uma porta de carvalho com uma maçaneta de latão");
            dinningRoom = new RoomWithHidingPlace("Sala de Jantar", "um candelabro de cristal", "na estante");
            kitchen     = new RoomWithDoor("Cozinha", "detalhes em aço inox", "dentro do armário", "uma porta com tela");
            backYard    = new OutsideWithDoor("Quintal dos Fundos", true, "uma porta com tela");
            garden      = new OutsideWithHidingPlace("Jardim", false, "no galpãozinho");
            frontYard   = new OutsideWithDoor("Quintal da Frente", false, "uma porta de carvalho com uma maçaneta de latão");

            stairs          = new Room("Escadas", "um corrimão de madeira");
            upstairsHallway = new RoomWithHidingPlace("Hall Superior", "um quadro de um cachorro", "no armário");
            masterBedroom   = new RoomWithHidingPlace("Quarto Principal", "uma cama grande", "debaixo da cama");
            secondBedroom   = new RoomWithHidingPlace("Segundo Quarto", "uma cama pequena", "debaixo da cama");
            bathroom        = new RoomWithHidingPlace("Banheiro", "uma pia e um vaso sanitário", "no chuveiro");
            driveway        = new OutsideWithHidingPlace("Calçada", true, "na garagem");

            livingRoom.SetExits(new Location[] { dinningRoom, stairs });
            dinningRoom.SetExits(new Location[] { livingRoom, kitchen });
            kitchen.SetExits(new Location[] { dinningRoom });
            backYard.SetExits(new Location[] { frontYard, garden, driveway });
            garden.SetExits(new Location[] { frontYard, backYard });
            frontYard.SetExits(new Location[] { backYard, garden, driveway });

            stairs.SetExits(new Location[] { livingRoom, upstairsHallway });
            upstairsHallway.SetExits(new Location[] { stairs, masterBedroom, secondBedroom, bathroom });
            masterBedroom.SetExits(new Location[] { upstairsHallway });
            secondBedroom.SetExits(new Location[] { upstairsHallway });
            bathroom.SetExits(new Location[] { upstairsHallway });
            driveway.SetExits(new Location[] { frontYard, backYard });

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

            opponent = new Opponent(frontYard);
        }