| Author |
Message |
Karl Scherer (Karl)
New member Username: Karl
Post Number: 399 Registered: 9-2000
| | Posted on Thursday, April 05, 2012 - 7:31 am: | |
I came across the following programming problem: In my 2-player game "Scrabl" the following turn-order works fine (?R is an additional random player, and pass-turn is forced): ... (Joe makes a move)(?R makes a move) (Joe passes)(?R makes a move) (Joe passes)(?R makes a move) (Joe passes)(?R makes a move) (Joe passes)(?R makes a move) (Joe passes)(?R makes a move) (Pat moves)... Now for a solitaire version ( called Scrabl Puzzles) I deleted the player Pat, but the system did not work as expected: after (Joe makes a move)(?R makes a move) (Joe passes) the other moves (?R makes a move)(Joe passes)(?R makes a move)... were ignored and the system stopped too early with the message "all side pass - game over". The reason is that Zillions does NOT treat the random player ?R as a "side"! Hence the turn order I described works ONLY FOR 2 PLAYERS OR MORE (plus ?R), not for one player plus ?R! Solution: I added a second player "Pat" and dummy move for Pat whose move-type is in the turn order but is never executed (creates an auto- "pass"). |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 143 Registered: 1-2007
| | Posted on Saturday, April 07, 2012 - 10:52 am: | |
The notion of a Zillions "random player" designated by the "?" prefix unfortunately binds three concepts together: 1) The player is "hidden" from the player selection box. 2) The player's action always takes place (ie. it's automatic). 3) A random player chooses moves randomly from the list of available moves. This features allows automatic actions to occur on the board that are consequences of actions taken by the "real" players. (Note that it is possible to work around the "random move" limitation by generating a single move for the random player that will necessarily be chosen by the random player.) Ideally Zillions would have separated these concepts so that the "random engine" could be applied to any player, either a "real player" (in the turn order) or a "hidden player" (designated with a "?" prefix). FWIW, Axiom makes this distinction by allowing an "engine" (random or otherwise) to be specified for any given player, be they "?hidden" or not. However, hidden players are still required to be "automatic" in order to maintain compatibility with the Zillions interface. |
|