public EndGameAction(System.IO.BinaryReader reader) { this.hasCheckmate = reader.ReadBoolean(); if (this.hasCheckmate) this.looser = (PlayerColor)reader.ReadByte(); else this.stalemateReason = (StalemateReason)reader.ReadByte(); }
public void OnStalemate(StalemateReason reason) { if (!this.IsActive) return; this.IsActive = false; if (this.Stalemate != null) this.Stalemate(reason); this.Turn = (PlayerColor)(-1); }
public EndGameAction(StalemateReason reason) { this.stalemateReason = reason; this.hasCheckmate = false; }