How the script works By default, Deal accepts all hands. With the main code in onespade , we tell Deal to override that behavior. This is similar to the way we used scripts to override Deal 's default formatting. Note, we even use the same flag, -i , to load our formatters and onespade . It is run after every deal is complete, and used to evaluate the hand.
Deal keeps trying until the requested number of deals is accepted.
If neither accept nor reject is called, the deal is rejected. You will often want to re-use a format, and placing them in one place lets you find out which formats are available. T962 the previous day at a Swiss Teams event. This turns out well for you on this deal, because at the other table, the opponents played in three spades, down 1. Afterwards, you wonder if you really made the right decision.