~alip/jja

b63e3e6512eaba25db7673d450f9c94429e412de — Ali Polatel 11 months ago e4fa6b4
restore: lichess eval export -> brainlearn (take 4)
1 files changed, 10 insertions(+), 4 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +10 -4
@@ 3420,25 3420,31 @@ fn brainlearn_restore_json(filename: &str) -> Result<()> {
            .with_context(|| tr!("Failed to parse Lichess evaluation JSON: `{}'.", line))?;
        let epd = match Epd::from_ascii(data.fen.as_bytes()) {
            Ok(epd) => epd,
            Err(error) => {
            Err(_error) => {
                /*
                 * Too noisy
                pb.println(tr!(
                    "Skipping invalid EPD `{}' on line {}: {}.",
                    data.fen,
                    line_count,
                    error
                ));
                */
                continue;
            }
        };
        let pos: Chess = match epd.into_position(CastlingMode::Standard) {
            Ok(pos) => pos,
            Err(error) => {
            Err(_error) => {
                /*
                 * Too noisy
                pb.println(tr!(
                    "Skipping illegal EPD `{}' on line {}: {}",
                    data.fen,
                    line_count,
                    error
                ));
                */
                continue;
            }
        };


@@ 3449,7 3455,7 @@ fn brainlearn_restore_json(filename: &str) -> Result<()> {
                let uci = pv.line.split_whitespace().next().expect("uci move");
                let mov = match Uci::from_ascii(uci.as_bytes()) {
                    Ok(mov) => mov,
                    Err(error) => {
                    Err(_error) => {
                        /*
                         * Too noisy
                        pb.println(tr!(


@@ 3464,7 3470,7 @@ fn brainlearn_restore_json(filename: &str) -> Result<()> {
                };
                let mov = match mov.to_move(&pos) {
                    Ok(mov) => brainlearn::from_move(mov),
                    Err(error) => {
                    Err(_error) => {
                        /*
                         * Too noisy
                        pb.println(tr!(