Exemple #1
0
        private Dictionary <string, int> getDicOfElements()
        {
            Dictionary <string, int> dicOfElements = new Dictionary <string, int>();

            for (int x = 0; x < index + 1; x++)
            {
                Casier casier = this.om.getCommand().getArmoire().getCasier(x);
                foreach (KeyValuePair <string, IElement> elem in casier.getElements())
                {
                    if (dicOfElements.ContainsKey(elem.Value.code))
                    {
                        dicOfElements[elem.Value.code]++;
                    }
                    else
                    {
                        dicOfElements.Add(elem.Value.code, 1);
                    }
                }
            }
            return(dicOfElements);
        }
Exemple #2
0
        //Add new Unit
        public void newCasier()
        {
            Casier newCasier = new Casier(32, _width, _depth, _color, _canHaveDoors);

            _casiers.Add(newCasier);
        }