Ejemplo n.º 1
0
        /// <summary>
        ///     Creates new objects.
        /// </summary>
        /// <param name="map">Map instance</param>
        private void ObjectsInit(IMap map)
        {
            int counterValue = random.Next(minObjectAmount, maxObjectAmount);

            for (int i = 0; i < counterValue; i++)
            {
                map.GameObjects.Add(gOFactory.Create(
                                        random.Next(idBegin, idEnd),
                                        objectId.ToString(),
                                        random.Next(salaryMinValue, salaryMaxValue),
                                        random.Next(0, map.Height),
                                        random.Next(0, map.Width)));
                objectId++;
            }
        }