public virtual void Move(Chess.Game.Square destination) { PieceMovingNotifier?.Invoke(); destination.ReceiveArrivingPiece(this); MovesMade++; }
public override bool canMoveTo(Chess.Game.Square destination) { var moves = base.FindAllPossibleLegalMoves(); IEnumerable <Move> matchingAllowedMove = moves.Where((Move move) => { return(move.Destination == destination); }); if (matchingAllowedMove.Any()) { return(true); } else { return(false); } }
public override bool canMoveTo(Chess.Game.Square destination) { return(this.CanMoveTo(destination)); }
public void Move(RankFile destination) { Chess.Game.Square destinationSquare = Board[destination]; Move(destinationSquare); }
public Square(Chess.Game.Square other) : this(piece: (other.IsEmpty) ? null : Graphical.Piece.Create(other.Piece.Object), new RankFile(other.RankAndFile)) { }