Ejemplo n.º 1
0
        public bool WouldLeaveInCheck(Move moveOriginal, Side side)
        {
            Board future = Board.DeepCopy();
            //Move moveTested = moveOriginal.DeepCopy(future);
            Move moveTested = new Move(future[moveOriginal.From], moveOriginal.To, future, true);

            future.Moves.Add(moveTested);
            moveTested.DoMove();

            return(future.IsInCheck(side));
        }
Ejemplo n.º 2
0
 public virtual void AppendCheckNotation()
 {
     if (Board.CheckIfMated(Piece.Side.Opposite()) == Piece.Side.GetVictoryStatus())
     {
         NotationAlgebraic += "#";
         NotationEnglish   += "mate";
     }
     else if (Board.IsInCheck(Piece.Side.Opposite()))
     {
         NotationAlgebraic += "+";
         NotationEnglish   += "ch";
     }
 }
Ejemplo n.º 3
0
        public override void AppendCheckNotation()
        {
            NotationAlgebraic += Promotion.Abbreviation();
            NotationPGN       += "=" + Promotion.Abbreviation();
            NotationEnglish   += "(" + Promotion.Abbreviation(true) + ")";

            base.AppendCheckNotation();

            if (Board.CheckIfMated(Piece.Side.Opposite()) == Piece.Side.GetVictoryStatus())
            {
                NotationPGN += "#";
            }
            else if (Board.IsInCheck(Piece.Side.Opposite()))
            {
                NotationPGN += "+";
            }
        }