[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pbmserv-dev] Determine if submit mode in PrintBoardAs



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.