M Winther (Kalroten)
New member Username: Kalroten
Post Number: 53 Registered: 1-2007
| | Posted on Sunday, February 03, 2008 - 1:21 am: | |
This is one way of doing it. Create external positions on which you place invisible dummy pieces, e.g. a piece named "mutual-stalemate" on x1. Then create a move-type e.g. "external-capture" with lower move-priority. So when a piece cannot make a move, this "external-capture" move will be executed instead, in which the external "mutual-stalemate" is captured. If this occurs twice in a row then both x1 and y1 (e.g.) will be empty and a draw condition is fulfilled: (draw-condition (total-piece-count 0 mutual-stalemate)) However, when the second party is not stalemated then the normal priority move must check whether x1 (or y1, respectively) is empty. If so, then a dummy piece e.g "party-stalemate" is captured on r1 or s1. You must check which one is "enemy?" before capturing it. Loss condition is set to (loss-condition (White Black) (captured party-stalemate) ). So before executing a normal move, the external square x1 or y1 must always be checked. Mats Winther |