Ughh, I would never have thought of that. It seems strange to cast operands to boolean, since it is the least informative of all data types, and makes the == operator least discriminating. I'd better avoid the usage of true and false in the future, and use 0 and 1. Or would that cast the string literal to a number before the comparison, so that I would still have the same problem?
Isn't there an operator to compare without any casting? (I.e. which evaluates to false whenever the types of the operands is not equal?)
In any case, the preset will now print the correct error message. I even diversified it, so that you get another message for moving through check and exposing your King to normal capture.
Ughh, I would never have thought of that. It seems strange to cast operands to boolean, since it is the least informative of all data types, and makes the == operator least discriminating. I'd better avoid the usage of true and false in the future, and use 0 and 1. Or would that cast the string literal to a number before the comparison, so that I would still have the same problem?
Isn't there an operator to compare without any casting? (I.e. which evaluates to false whenever the types of the operands is not equal?)
In any case, the preset will now print the correct error message. I even diversified it, so that you get another message for moving through check and exposing your King to normal capture.