[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [pbmserv-dev] Determine if submit mode in PrintBoardAs
Ok, I won't change anything, and we'll wait until Richard returns.
This will allow me to fix a loophole in Scramble that allows one to
"submit" a move, and see what the new letters they draw will be. If they
don't like their new letters, than can submit another move until they
get new letters they like. My change will hide the display of the
player's letters on the output of a Submit command.
-----Original Message-----
From: owner-pbmserv-dev@gamerz.net [mailto:owner-pbmserv-dev@gamerz.net]
On Behalf Of John Williams
Sent: Thursday, May 16, 2002 4:32 PM
To: pbmserv-dev@gamerz.net
Subject: RE: [pbmserv-dev] Determine if submit mode in PrintBoardAs
I don't think Richard will object to that change. I can do it for you
if you like, but let's wait until after he gets back from his current
business trip at least.
~ John Williams
On Thu, 16 May 2002, Bob Lafleur wrote:
> Good idea... But it doesn't quite work. I tried making a PrintAs(...)
> in my game class, setting the flag if appropriate, calling the
> Game::PrintAs(), then resetting the flag. But my game's PrintAs()
> never gets called because the Game::PrintAs() is not defined as
> virtual. I tried changing my local Game::PrintAs() definition to
> virtual, and that resolved it, but unless Richard is willing to change
> his definition... Or is there another way I can define my PrintAs() to
> take precedence without having Game::PrintAs() defined virtual?
> Thanks.
>
> - Bob
>
> -----Original Message-----
> From: owner-pbmserv-dev@gamerz.net
> [mailto:owner-pbmserv-dev@gamerz.net]
> On Behalf Of John Williams
> Sent: Thursday, May 16, 2002 1:49 PM
> To: pbmserv-dev@gamerz.net
> Subject: Re: [pbmserv-dev] Determine if submit mode in PrintBoardAs
>
>
> You could try overloading Submit() or PrintAs() and do this:
>
> private_variable = type; // put the type where the whole object
> can see it
> Game::PrintAs(...); // call the parent function.
> private_variable = 0; // reset the type
>
>
> ~ John Williams
>
>
> On Thu, 16 May 2002, Bob Lafleur wrote:
>
> > I would like to know if my game's PrintBoardAs is printing a board
> > with a submitted move. Unfortunately, the type doesn't get passed to
> > PrintBoardAs. I did try using submit.Count() to determine if a move
> > is
>
> > submitted. This more or less works, but if a player submits a move
> > that results in an error,
> > submit.Count() remains true, so if the player does a showas, the
> > game
> still
> > thinks a move is submitted.
> >
> > Any other suggestions?
> >
> >
> > 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.
> >
>
>
> 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.
>
>
>
> 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.
>
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.