StefanSalewski / rust-chess

Port of salewski-chess from Nim to Rust
MIT License
0 stars 1 forks source link

Can human player do invalid castling when in check? #2

Closed StefanSalewski closed 5 months ago

StefanSalewski commented 5 months ago

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.

StefanSalewski commented 5 months ago

Fixed.