[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] Syncmoves
On Fri, 1 Jul 2005, Michael Hammond wrote:
> Isn't it funny how the syncmoves. Trying to make those non-sequential
> moves.
>
> Can anybody explain the relationship between the moves and syncmoves
> containers for non-sequential games? I keep flipping back and forth between
> ToW and Game.CPP trying to puzzle it out.
If I remember right, when players send in their moves, they are stored in
syncmoves (instead of moves) until everyone has submitted a move. At that
point ProcessRound (which you supply) is called to update the board, and
the moves in syncmoves are then stored in moves.
> On that same theme, how do you retrieve the list of recent moves in a
> non-sequential game AND figure out who made which moves?
Moves from previous rounds are in moves, and moves from the current round
are in syncmoves.
The player currently moving is in the global "player" variable, which is
why tow.cpp has this line in MakeMove:
int idx = players.Has(player);
> By the way, thanks to everybody who helped the newbie get his first game
> working. I appreciate all your patience and thoughtful advice.
>
> As a side note, I fear I'm becoming a pest. Is there any other way to learn
> how to code against PBMServ other than to post questions here? I'm sure
> many of you have homes or jobs or something more interesting than my PBMServ
> questions.
Reading the code and experimenting on your own are pretty much standard
practice, I would guess.
Just don't attempt to change game.cpp until you have done a couple game
modules. :)
~ John Williams