In the FEN "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1", the move "f6-f3" is being validated as legal.
The recent changes to search a move in the pool of legal moves was done with indexOf(), but the pool of legal moves should have some separation between them, otherwise you run into the problem of accidentally matching a to-from in from-to-from-to.
In the FEN
"r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1"
, the move"f6-f3"
is being validated as legal.The recent changes to search a move in the pool of legal moves was done with indexOf(), but the pool of legal moves should have some separation between them, otherwise you run into the problem of accidentally matching a to-from in from-to-from-to.