1
0
Fork 0

text records

This commit is contained in:
Paul-Nicolas Madelaine 2025-10-19 16:45:33 +02:00
parent 0e65b4f927
commit bbe65b74f4
6 changed files with 173 additions and 167 deletions

View file

@ -13,7 +13,7 @@ time that no illegal move is played, with no runtime checks and no potential pan
use eschac::prelude::*;
// read a position from a text record
let setup = "7k/4P1rp/5Q2/5p2/1Pp1bP2/8/r4K1P/6R1 w - -".parse::<Setup>()?;
let setup = Setup::from_text_record("7k/4P1rp/5Q2/5p2/1Pp1bP2/8/r4K1P/6R1 w - -")?;
let position = setup.validate()?;
// read a move in algebraic notation