Exemplo n.º 1
0
        public static Move GetMoveWithNotation(Move move, Board board)
        {
            Move newMove = new Move();

            newMove._pieceToMove    = move._pieceToMove;
            newMove._targetPosition = move.targetPosition;
            newMove._referencePiece = move._referencePiece;
            newMove._hex            = move._hex;
            newMove._notation       = NotationParser.GetNotationForMove(move, board);
            return(newMove);
        }
Exemplo n.º 2
0
 public static bool TryGetMove(string notation, out Move move)
 {
     if (NotationParser.TryParseNotation(notation, out move))
     {
         move._notation = notation;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 3
0
        public static Move GetMove(string notation)
        {
            Move move;

            if (NotationParser.TryParseNotation(notation, out move))
            {
                move._notation = notation;
                return(move);
            }
            else
            {
                throw new Exception("Bad move notation");
            }
        }
Exemplo n.º 4
0
 internal void FixNotation(Board board)
 {
     _notation = NotationParser.GetNotationForMove(this, board);
 }