Draw condition Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Draw condition « Previous Next »

Author Message
Ulrich Koenig (Kiebitz)
Posted on Monday, January 22, 2001 - 3:24 pm:   

In Shatranj, a side loses when it just has the King left. However, it is a draw if this side can legally capture the last non-King piece of the enemy as well in the next move. I have no clue about how to implement this latter condition.
Karl Scherer (Karl)
Posted on Monday, January 22, 2001 - 4:34 pm:   

Hi Ulrich,

Do NOT use the standard way to use win-condition commands.

Have a subroutine "Check" that checks for every
move whether there is only the king left and
whether that king can catch the other king
in the subsequent move.
Depending on the findings of this subroutine,
set a "permanent flag" called "DRAW"
or a permanent flag called "LOSS" which the
win-condition can test (absolute-config).

You can find my description of how to set
a "permanent flag" in my response
to the following query further up in the questions-list:

"How do I kill a certain piece or make a happen when a piece dies?"

Cheers, Karl
Karl Scherer (Karl)
Posted on Monday, January 22, 2001 - 4:42 pm:   

That should read:

You can find my description of how to set
a "permanent flag" in my response
to the following query further up in the questions-list:

"Pieces with many positions"
Malcolm Maynard (Daviim)
Posted on Thursday, September 25, 2003 - 10:31 pm:   

I've had trouble with the standard draw-condition command for a ZRF I'm working on. What I am trying to do is make checkmating one kind of piece a draw condition with somthing like:
(draw-condition (White Black) (checkmated widget) )

Unfortunately, Zillions is treating this is as a loss-condition and not a draw-condition.

Is there something I'm overlooking, perhaps?

~*~ Daviim ~*~
Roger J Cooper (Rogercooper)
Posted on Thursday, October 09, 2003 - 5:37 pm:   

The checkmated condition can be little fidgety. Try using a pieces-remaining condition instead.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: