示例#1
0
 public override void Undo()
 {
     if (executed)
     {
         TargetTile.DetachPiece();
         SelectedTile.AttachPiece(Piece, PieceHasMoved);
         executed = false;
     }
 }
示例#2
0
 public override void Undo()
 {
     if (executed)
     {
         TargetTile.DetachPiece();
         SelectedTile.AttachPiece(Piece, PieceHasMoved);
         if (Piece is IEnPassantable)
         {
             IEnPassantable enPassantablePiece = Piece as IEnPassantable;
             enPassantablePiece.CurrentlyEnPassantable = false;
         }
         executed = false;
     }
 }