is_ucilan: Check if a string contains chess moves in UCI-format long...

View source: R/is_ucilan.R

is_ucilanR Documentation

Check if a string contains chess moves in UCI-format long algebraic notation (LAN)

Description

The function uses regular expressions to check if the string's tokens match the expected pattern for chess moves in LAN.

Usage

is_ucilan(movetext)

Arguments

movetext

A character string, possibly containing a series of chess moves in SAN.

Details

UCI-format long algebraic notation is described in the UCI protocol. Note that this function does not check if the moves are legal.

Value

TRUE if the string contains valid chess moves in LAN, FALSE otherwise

Examples

is_ucilan("e2e4 e7e5 g1f3 b8c6")
is_ucilan("1. e4 e5 2. Nf3 Nc6")


dryguy/rbitr documentation built on Oct. 15, 2024, 6:18 a.m.