[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] about matches for games
Douglas,
that's a wonderful dirty idea! Well, I don't like that boards
and move history are going to disappear and I foresee further
troubles. Sooner or later you would want a command to resign a
whole match, see the current score, ... Not to mention the
command to challenge a match. It turns out they already exist.
So why not keeping as much orthogonal as possible? Let's say
Match is a new game on the server. We would start a match by
sending something like:
[subject:] match challenge -score=20 dzander chaunier
for the first who gets 20 points (or more), or
[subject:] match challenge -count=6 dzander chaunier
for a match with 6 games.
Hmm, I first thought we might pass the name of the game as a
parameter et voila, but we might want to pass some options to
all the challenges issued, so I guess we'll need more information
than can squeeze into the subject line. Let's add parameters in
the body :^/ They would simply be the challenge commands we want
to be automatically issued. If more than one line is there, it
means they are going to be issued alternately:
[body:]
backgammon challenge dzander chaunier
backgammon challenge chaunier dzander
We'll get a board number for the match as well as consecutive
board numbers for every game included in it. We'll send no
moves to the match board. The server shall move for us. A move
would be either a challenge or a game completed. Those should
update the match board. So I guess the real games must remember
that it wasn't a human who challenged them but a specific match
and send their result when they are over.
A show command would show the list of related real board
numbers and the current score. Hence games are also going
to need a method returning a score (not only 0 or 1 according
to whether a player lost or won). That would allow matches
of Hearts games that ends with 100 points.
Like that, you can even play a match of matches...
Well, sorry, that seems to be about base source modules,
doesn't it? But I don't see any practical other way.
Claude Chaunier