| Author |
Message |
John Henckel (Jdhenckel)
| | Posted on Sunday, November 18, 2001 - 5:59 pm: | |
I am trying to implement a game like Halma with captures. The rules say that pieces can hop in any direction as long as the final stopping place is ahead of the starting place. This has a strange effect that after several hops (implemented with add-partial) the player can reach a dead end (an illegal position) and is forced to undo the hops. However, it is not so easy, because some of the hops may have involved captures, and so they cannot be taken back!! This should not be a problem because I put (pass-partial false) in my game. If a player ends up in a partial move dead-end, and pass-partial is FALSE then the player should either lose the game, or else be required to re-take the move. However, Z just allows the player to pass anyway! Isn't this a bug in Z? |
Dan Troyka (Dtroyka)
| | Posted on Monday, November 19, 2001 - 7:55 am: | |
While I don't know the specifics of the game, if a piece can get to a position, then it got there legally (that's a tautology in Zillions), and if from that position it has no further moves, then the turn terminates. That is not a pass because a pass occurs only if there was a further move available that the player chose not to take. To implement a loss condition like the one you described you would probably have to test, at the end of a partial move, whether another partial move was available and then, if it was not, whether the current square is ahead of the starting square. If not, a loss could be declared by placing a piece on a dummy square. |
|