| Author |
Message |
Richard Hutnik (Richardhutnik)
| | Posted on Friday, February 07, 2003 - 10:56 pm: | |
I am taking my Sophia game and adding a multijump variant to it. I want to have the game so that a piece can't land back on the square it initially started at. What is the syntax for doing this? Thanks... - Richard Hutnik |
Dan Troyka (Dtroyka)
| | Posted on Saturday, February 08, 2003 - 8:19 am: | |
To stop a piece from jumping back to the square it immediately jumped from, before the add-partial insert: to (if last-from? back (verify not-last-to?)) This assumes that the add occurs at the destination square in the move logic and that you haven't marked any squares. There's no easy way to stop a piece that can make multiple jumps from returning to its initial square after the second jump in a series. However, if pass-partial is set to true, i.e., if a player is not obligated to continue jumping, Zillions will automatically test for board repetition after each jump. You can define repetition as a loss with the result being that when a board position is achieved for the third time, including during a circular jumping series by a single player, the moving player loses by repetition. This is how Halma is coded on the Zillions CD. For reasons deep and mysterious repetition does not work when pass-partial is set to false, i.e., when you are required to move as long as partial moves are available. This was the problem in Camelot, which I solved with an elaborate system of visible markers occupying squares through which a piece has jumped in a jumping sequence, with the markers cleared when the series ends. This coding is no fun at all although it should be easier in ZoG 2.0 using the create command. |
Richard Hutnik (Richardhutnik)
| | Posted on Saturday, February 08, 2003 - 8:00 pm: | |
This is the problem I am running into, multiple jumps and ending up back at the original square. Using the chinese checker/Halma code, the end result I found was the AI would go into this endless loop that caused the game to turn into a draw. What would be cool is if there were a starting square check for Zillions that would have players check to see if the piece landed where it originally started the turn on. |
Karl Scherer (Karl)
| | Posted on Saturday, February 22, 2003 - 11:33 pm: | |
I suggest using a second (invisible) board and storing a piece on the starting-square would solve the problem. I have used this trick in several games. (connect the corresponding positions of the boards by a special direction, say "y". ) |
Karl Scherer (Karl)
| | Posted on Saturday, February 22, 2003 - 11:34 pm: | |
"Delayed Chess" has 4 several boards connected that way (but for other reasons). |
|