예제 #1
0
 protected GameState()
     : base()
 {
     this.events = new Events();
 }
예제 #2
0
 public GameState(ServerGameState source, int playerIdx)
     : base(source)
 {
     this.events = new Events(source.playerEvents[playerIdx]);
     source.playerEvents[playerIdx].Clear();
 }
예제 #3
0
 public GameState(GameState source)
     : base(source)
 {
     this.events = new Events(source.events);
 }
예제 #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);
     }
 }
예제 #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)
 {
 }