Exemple #1
0
 public StepAction(ActionType type, IInteract subject, Point position, Color color)
 {
     Type        = type;
     Subject     = subject;
     Position    = position;
     CurrentStep = StepCounter.GetInstance().GetCounter();
     Color       = color;
 }
Exemple #2
0
        /// <summary>
        /// Выполнить один шаг игрового мира.
        /// </summary>
        /// <returns>Новый мир.</returns>
        public IList <IStepable> Step()
        {
            var newWorld = new List <IStepable>();

            foreach (var elem in currentWorld)
            {
                elem.Step(currentWorld, newWorld);
            }

            StepCounter.GetInstance().Inc();
            currentWorld = newWorld;

            return(newWorld);
        }