public override string ToString() { switch (Type) { case MoveType.Castle: return(Castle.ToString()); case MoveType.EnPassant: return(EnPassant.ToString()); case MoveType.NormalPiece: return(NormalPieceMove.ToString()); case MoveType.Promotion: return(Promotion.ToString()); default: throw new AlienChessException(); } }
public static Move CreateNormalMove(ChessPiece piece, Position newPosition, bool takes) { var move = new NormalPieceMove(piece, newPosition, takes); return(new Move(move)); }
public Move(NormalPieceMove normal) { NormalPieceMove = normal; Type = MoveType.NormalPiece; }