[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] Help with gameboard subscribe
A typical resignation does the following...
it updates the resigned[] array, and with non-zero status for the
resigning player.
It then adds the resigning player to the subscribers[] list.
The move notify segment only sends updates to players who have
a 0 entry in the corresponding resigned[] array.
The move notify then sends updates to players in the subscribers
list.
This way, a player can unsubscribe to a game after he's out and
not get any more board updates.
The ReadBoard() function should deal with all of this gracefully.
On Sun, Jan 26, 2003 at 12:41:52AM -0500, Chris Nash wrote:
> Hi folks,
>
> I hope some kind soul can give me a clue what I'm doing wrong...
>
> I decided it might be a good idea to test some of the "standard" board options with the cribbage implementation I'm working on. Initially I was trying to work out what happens when a player resigns. What I found out was my game file no longer loaded :(
>
> I looked a bit deeper and it turned out that a resigning player gets added to the subscribe list for that game, and I can get the same problem if I just subscribe to a board from some other account. When I looked in Game::Read() and Game::Write() it looked to me like the subscribers list appears after my game-specific data and I'm not getting ReadBoard() called until after my data has been skipped... what am I doing wrong?
>
> Any help would be greatly appreciated!
>
> Chris
>
>
> To unsubscribe, send a message to esquire@gamerz.net with
> unsubscribe pbmserv-dev@gamerz.net
> as the BODY of the message. The SUBJECT is ignored.
>
--
/ \__ | Richard Rognlie / Sendmail Ninja / Gamerz.NET Lackey
\__/ \ | http://www.gamerz.net/rrognlie/ <rrognlie@gamerz.net>
/ \__/ | Today is the first day of the rest of your life. Of course,
\__/ | so was yesterday, and look how you screwed *that* up...