public override void Update(BaseSnapshot snapshot)
        {
            base.Update(snapshot);
            var x = (TurnbasedSnapshot)snapshot;

            TurnAllowedSides = x.TurnAllowedSides;
        }
        public override void Update(BaseSnapshot snapshot)
        {
            base.Update(snapshot);
            var x = (RealtimeSnapshot)snapshot;

            CurrentCycle  = (int)x.CurrentCycle;
            CycleDuration = (float)x.CycleDuration;
        }
        private void HandleSnapshot(BaseSnapshot snapshot)
        {
            ai.Update(snapshot);

            if (!gameRunning)
            {
                gameRunning = true;
                ai.Initialize();
                if (!Config.GetInstance().Configuration.Value("ai").Value <bool>("create_new_thread") ||
                    ai.AllowedToDecide())
                {
                    new Thread(() => ai.Decide()).Start();
                }
            }
            else if (Config.GetInstance().Configuration.Value("ai").Value <bool>("create_new_thread") &&
                     ai.AllowedToDecide())
            {
                new Thread(() => ai.Decide()).Start();
            }
        }
 public abstract void Update(BaseSnapshot snapshot);
 public override void Update(BaseSnapshot snapshot)
 {
     ((dynamic)World).Deserialize(Parser.GetBytes(snapshot.WorldPayload));
 }