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