Exemple #1
0
        public void CreateFutureRooms(int depth, int walkTo)
        {
            if (depth % 5 != 0)
            {
                rooms.Add(RPGRoomFactory.CreateBasicRoom(depth, 0));

                if (walkTo != 3)
                {
                    rooms.Add(RPGRoomFactory.CreateBasicRoom(depth, 1));
                }
                else
                {
                    rooms.Add(null);
                }

                if (walkTo != 2)
                {
                    rooms.Add(RPGRoomFactory.CreateBasicRoom(depth, 2));
                }
                else
                {
                    rooms.Add(null);
                }
            }
            else
            {
                rooms.Add(RPGRoomFactory.CreatePuzzleRoom(depth));
                rooms.Add(null);
                rooms.Add(null);
            }
        }
Exemple #2
0
 public RPGGame()
 {
     _depth       = 0;
     _player      = new RPGPlayer();
     _currentRoom = RPGRoomFactory.CreateBasicRoom(0, 0);
     _currentRoom.CreateFutureRooms(_depth, 1);
     _currentRoom.Initialize();
 }
Exemple #3
0
 public void CreateFutureRooms(int depth, int walkDir)
 {
     rooms.Add(RPGRoomFactory.CreateBasicRoom(depth, 0));
     rooms.Add(RPGRoomFactory.CreateBasicRoom(depth, 1));
     rooms.Add(RPGRoomFactory.CreateBasicRoom(depth, 2));
 }