🕸📝Fergus Duniho wrote on Sun, Dec 19, 2010 06:17 PM UTC:
Now that I think about it, constants will not work in solitaire mode, because it never writes anything to a log. I am going to work on including constants in the forms that pass variable values. In the meantime, you might write your code to check the contents of the move, which you can check with the thismove keyword in an expression. Since the ask command will append to the move, all you have to check is whether the move is complete. For example, if your short and long castling moves differ on the position the Rook moves to, check the move for a Rook move, calling on ask only if the Rook move isn't present. Doing it this way also stops ask from being used when a player manually enters in the full move.
Now that I think about it, constants will not work in solitaire mode, because it never writes anything to a log. I am going to work on including constants in the forms that pass variable values. In the meantime, you might write your code to check the contents of the move, which you can check with the thismove keyword in an expression. Since the ask command will append to the move, all you have to check is whether the move is complete. For example, if your short and long castling moves differ on the position the Rook moves to, check the move for a Rook move, calling on ask only if the Rook move isn't present. Doing it this way also stops ask from being used when a player manually enters in the full move.