douglasbagnall / p4wn

a smallish turn-of-the-century javascript chess engine
http://p4wn.sf.net
113 stars 33 forks source link

castling under check #3

Closed yelizariev closed 12 years ago

yelizariev commented 12 years ago

p4wn.js allow make castling under check

"rnb1r1k1/ppp2ppp/8/8/2PN4/2Nn4/P3BPPP/R3K2R w KQ - 5 14"

douglasbagnall commented 12 years ago

Fixed in commit 7a3b428bb9883ef5e8c1666510d1042cd8650029.

This missed checks were for knights two rows out and to the queen side. There were two lines with "+1" whereas one of then needs to be "-1".

Well spotted, Ivan, and thanks again.