示例#1
0
        public Room(E_RoomsName Name, List<Item> Items)
        {
            this.Name = Name;

            this.Items = Items;
            // ogni stanza contnene anche le clues che verranno mostate nelle finestre degli item
            // più una Clue che sarà risolutiva per un'altra stanza
        }
        /// <summary>
        /// Generate a populated <see cref="Room"/> 
        /// </summary>
        /// <param name="Name">The name of the room to be generated</param>
        /// <param name="CorrectItem">The correct <see cref="Item"/> to be conteined in the room</param>
        /// <returns></returns>
        private Room GenerateRoom(E_RoomsName Name, Item CorrectItem)
        {
            Room wvRoom = null;
            List<Item> wvItems = new List<Item>();
            wvItems.Add(CorrectItem);

            for (int i = (int)E_ItemType.A + 1; i<= (int)E_ItemType.F; i++)
            {
                AbstractItem wvAbstractItem = new AbstractItem((E_ItemType)i, CorrectItem.ItemKind);

                wvAbstractItem = InvertByItemType(CorrectItem, (E_ItemType)i);

                wvItems.Add(attDataBase.GetItemFromAbstractItem(wvAbstractItem));

            }

            wvRoom = new Room(Name, wvItems);
            return wvRoom;
        }
示例#3
0
 private Room GetRoom(E_RoomsName RoomName)
 {
     foreach (Room r in attRooms)
         if (r.Name == RoomName)
             return r;
     return null;
 }
示例#4
0
 public Item GetItem(E_RoomsName RoomName, string ItemBarCode)
 {
     return GetRoom(RoomName).GetItem(ItemBarCode);
 }
示例#5
0
 public Item GetItem(E_RoomsName RoomName, int ItemCode)
 {
     return GetRoom(RoomName).GetItem(ItemCode);
 }
示例#6
0
 public Room(E_RoomsName Name)
 {
     this.Name = Name;
     this.Items = new List<Item>();
     this.LastClueAlreadyShown = false;
 }