| Author |
Message |
Matthew Burke (Morat)
| | Posted on Thursday, December 26, 2002 - 6:17 pm: | |
I'm trying to finish up a game (see the "Need Help Debugging" thread. I've got it all squared away except for the loss-condition. I'm using the following: (loss-condition (Blue) (total-piece-count 0 BlueRook)) (loss-condition (Green) (total-piece-count 0 GreenRook)) but sometimes the wrong player is declared the winner. I'm trying to pin down a consistent set of circumstances that results in the error and haven't gotten there yet. The code can be found at http://zog.bluedino.net/Boll.zip. Anything obvious I'm missing? Not the following: all pieces are owned by a neutral player and the turn order is (turn-order (Blue Neutral) (Green Neutral)) |
Guenther Rosenbaum (Guenther)
| | Posted on Thursday, December 26, 2002 - 7:39 pm: | |
Help-File says: Unlike other goals it's possible to omit the player list when using total-piece-count at the top level of a win/loss/draw-condition. When used in this way, the winner is assumed to be the side that just moved. It seems, that the player is always ignored on the top level - winner is always the opponent of the color just doing the last move in your game ! Putting this goal to a lower level, I think it works: (loss-condition (Blue) (and (pieces-remaining 0) ; dummy statement (total-piece-count 0 BlueRook))) (loss-condition (Green) (and (pieces-remaining 0) (total-piece-count 0 GreenRook))) |
Matthew Burke (Morat)
| | Posted on Friday, December 27, 2002 - 12:19 pm: | |
Thanks Guenther. That works quite nicely! For whatever reason I tend to get frustrated writing zrf code much more quickly than writing in other languages and I often don't get around to just tinkering and experimenting. |
Jeff Mallett (Jeffm)
| | Posted on Saturday, December 28, 2002 - 4:27 pm: | |
I've verified this to be a problem in Zillions. I'll work on a fix for it. |
Jeff Mallett (Jeffm)
| | Posted on Saturday, May 10, 2003 - 12:37 am: | |
Zillions was indeed ignoring the specified players if total-piece-count was at the top level. I've fixed this bug in version 2.0.1, which is now available. Thanks for letting me know about this. |