Exemple #1
0
 public EndGameAction(System.IO.BinaryReader reader)
 {
     this.hasCheckmate = reader.ReadBoolean();
     if (this.hasCheckmate)
         this.looser = (PlayerColor)reader.ReadByte();
     else
         this.stalemateReason = (StalemateReason)reader.ReadByte();
 }
Exemple #2
0
        public void OnStalemate(StalemateReason reason)
        {
            if (!this.IsActive)
                return;

            this.IsActive = false;

            if (this.Stalemate != null)
                this.Stalemate(reason);
            this.Turn = (PlayerColor)(-1);
        }
Exemple #3
0
 public EndGameAction(StalemateReason reason)
 {
     this.stalemateReason = reason;
     this.hasCheckmate = false;
 }