🕸📝Fergus Duniho wrote on Mon, Nov 23, 2015 02:20 AM UTC:
By the way, when entering these moves, I noticed an odd glitch. When I tried to play 9... K 7f-8g, a message appeared saying that the move was "not marked as legal". Strangely, the preset still allowed the move (but would not allow moves that truly were illegal).
This is not a glitch but a failsafe. For the JavaScript to know which moves are legal, they all have to be calculated ahead of time. But this is trickier than just testing any move for legality, because it also involves anticipating every possible move. Just in case the precalculation of legal moves misses something, the failsafe is built in of allowing any move with just a warning that it isn't recognized. This failsafe is especially helpful when developing code for calculating legal moves in advance.
This is not a glitch but a failsafe. For the JavaScript to know which moves are legal, they all have to be calculated ahead of time. But this is trickier than just testing any move for legality, because it also involves anticipating every possible move. Just in case the precalculation of legal moves misses something, the failsafe is built in of allowing any move with just a warning that it isn't recognized. This failsafe is especially helpful when developing code for calculating legal moves in advance.