[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pbmserv-dev] More than one game WAS: Re: Series of Cathedral Games
All this talk about playing "pairs" of cathedral games reminded me of what
I was going to do with the backgammon games. I don't think Richard wants
this on his server but... I was thinking of reprogramming the bg modules
so as to allow for matches. What I would do is add another ReadWriteIntList
variable to the game file called "matches" and then when one game finished
I would simply *not* return a value for the IsGameOver() function but rather
I would reset all variables (including erasing the "moves" array) and
continue on as if a game is still in progress. I would continue this
process until all points of the match have been reached and a match winner
is found. Then, and only then would I return a value for the IsGameOver()
function and end that particular board. Throughout the match, the board
number would remain the same (consider it the match number :-) and the
printout function would give the current match score with every board.
The drawback of this is that every game module would need to be
reprogrammed if that game is to be played in pairs or matches. The only
advantage of this system I can see is that it would be easy to controll
the requirements of match play; for example, backgammon has a few rules
(Crawford Rule) about when a player may use the doubling cube.
--
Douglas Zander