示例#1
0
        public ErrorCondition Move(string input)
        {
            if (MoveParser.TryParseMove(input, CurrentState.Board, CurrentTurn, out AnnotatedMove move))
            {
                return(Move(move.Move));
            }

            return(ErrorCondition.InvalidInput);
        }
示例#2
0
        public AnnotatedMove ParseMove(string input)
        {
            if (MoveParser.TryParseMove(input, CurrentState.Board, CurrentTurn, out AnnotatedMove move))
            {
                return(move);
            }

            throw new FormatException($"Could not parse move '{input}' for current board state");
        }