StefanSalewski / rust-chess

Port of salewski-chess from Nim to Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can human player do invalid castling when in check?

StefanSalewski opened this issue · comments

From

if !(in_check(&g, q[1] as i64, color) || in_check(&g, q[2] as i64, color)) {
                    kk.di = (q[0] + q[5]) as i8;
                    s.push(kk);
                }

in function tag() it seems that we should test king position for check as well? We should investigate this issue.