Ejemplo n.º 1
0
 protected GameState()
     : base()
 {
     this.events = new Events();
 }
Ejemplo n.º 2
0
 public GameState(ServerGameState source, int playerIdx)
     : base(source)
 {
     this.events = new Events(source.playerEvents[playerIdx]);
     source.playerEvents[playerIdx].Clear();
 }
Ejemplo n.º 3
0
 public GameState(GameState source)
     : base(source)
 {
     this.events = new Events(source.events);
 }
Ejemplo n.º 4
0
 public Events(Events source)
     : this()
 {
     foreach (BlockEvent ev in source.blockEvents)
     {
         this.blockEvents.Enqueue(ev);
     }
     foreach (UnitEvent ev in source.unitEvents)
     {
         this.unitEvents.Enqueue(ev);
     }
 }
Ejemplo n.º 5
0
        public override void ProcessEvents(Events events)
        {
            foreach (BlockEvent ev in events.blockEvents)
            {
                Debug.WriteLine("Player " + (this.myPlayerIdx + 1).ToString() + " : Marking block at " + ev.point.ToString() + " as " + ev.newState.ToString());
                this.blocks[ev.point.X, ev.point.Y] = ev.newState;
            }

            events.Clear();
        }
 public virtual void ProcessEvents(Events events)
 {
 }