Author |
Message |
Jay Leone (Stewbiedoo)
| Posted on Sunday, March 10, 2002 - 10:05 am: | |
I have working diligently on one of my first creations and have come across two stumbling blocks. 1. win-condition: my win condition is with one side having four pieces in a row (in any direction); however, all of the pieces are different, so how do I script it so that the pieces can be in any order in any of the possible places without typing all possibilities? 2. New piece movement: one piece of the piece moves only forward until it reaches the end of the board. How do I script this- I imagine that using (opposite) in some manner might be the best possibility; however, I can't figure it out. I hope these questions aren't too basic for anybody out there to lend me a hand- i chipped away at these problems for a while and could quite figure them out. Any suggestions would be greatly appreciated! |
Roger J Cooper (Rogercooper)
| Posted on Tuesday, March 12, 2002 - 4:20 am: | |
1. If you look under relative-config in the language reference you will note that you can use a not command as below: ; Checks for the absence of a friendly Pawn, then "n" of that for an enemy Pawn, ; then "n" of that for the absence of an enemy Pawn. (relative-config (not Pawn) n (opponent Pawn) n (not (opponent Pawn))) If you want the relative configuration to be any piece, just declare to be 'not' a piece that is not used on the board. 2. You are not completely clear on this, but I assume that you want to piece to turnaround at the end of the board. That is just a promotion from a forward-going piece to a backward-going piece. |
Karl Scherer (Karl)
| Posted on Friday, March 15, 2002 - 1:45 am: | |
Hi Jay, see my game ONWARDS CHESS for an example of a game where the pieces move forwards only (or sideways in this case). When they reach the opposite border, their direction is reversed. Cheers, Karl |
|