| Author |
Message |
dhalgren (Dhalgren)
| | Posted on Sunday, April 30, 2006 - 6:32 pm: | |
I'm having trouble writing a ZRF for a game that I'd like to test. I need pieces to change types when landing on square that will be undefended. But using not-defended? doesn't work because the square is defended by the piece that wants to move there. So, is there an easy way to do this? |
L. Lynn Smith (Interrupt27)
| | Posted on Sunday, April 30, 2006 - 9:43 pm: | |
Here's goes a round-about way: Have each player a specific dummy piece which sits on a dummy position. Give every piece on the field an attribute which will be toggled on when it changes type. This attribute should be toggled off when the pieces move. Have the dummy piece check every positon on the field for an enemy piece which sits on a last-to? position, has its attribute toggled on and is defended, then this dummy piece captures the opposing dummy piece. Set the capture of this dummy piece as a checkmated loss-condition. |
|