Exemplo n.º 1
0
 protected Dictionary<Command.Directions, int> CavePathsFor(int cavern)
 {
     if (CavernDoesntExist(cavern))
     {
        cave[cavern] = new Cavern();
     }
     return cave[cavern].Paths;
 }
Exemplo n.º 2
0
        public void PlaceItem(int cavern, MapItems item)
        {
            if (CavernDoesntExist(cavern))
                cave[cavern] = new Cavern();

            if (HasPlayer() && item == MapItems.Player)
                cave[(int) PlayersCurrentCavern()].MapItems.Remove(MapItems.Player);

            if (WumpusCavern != null && item == MapItems.Wumpus)
                cave[(int) WumpusCavern].MapItems.Remove(MapItems.Wumpus);

            cave[cavern].MapItems.Add(item);
        }