[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pbmserv-dev] Adding a command to a game
- To: pbmserv-dev@gamerz.net
- Subject: Re: [pbmserv-dev] Adding a command to a game
- From: Lyman Hurd <lhurd@yahoo.com>
- Date: Wed, 21 Sep 2005 19:37:08 -0700 (PDT)
- Authentication-results: play.gamerz.net header.From=lhurd@yahoo.com; domainkeys=pass
- Authentication-results: sentrion.gamerz.net header.From=lhurd@yahoo.com; domainkeys=pass
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=E/W4orCu230VLBA3mX1oG8mND/yPGEnk1CIrYsMgadtL1FALwUr/a5MUwpKH3g6TeKHg0XaCRTHA+0VmmJT6YCWem3fk9qG8UOdDzIoZ1KZplCi6bbN5/3AAhAaFAAA5Oy9selGPbvmYW9CFAwmji3/imLh38baLMTgwxSnobb8= ;
- In-reply-to: <43320E76.3070704@rdbhn.org>
- Reply-to: pbmserv-dev@gamerz.net
- Sender: owner-pbmserv-dev@gamerz.net
Well yes, come to think of it there are somw drawbacks
to what I was proposing. For example, if you do a
"show" rather than a "showas" you are not in the
context of any specific user.
Possibly adding a command is the most reasonable
option...
As noted virtual methods can have a default
implementation usable by all classes that do not
specifically override it, or in some cases a method
can be made "pure virtual" in which case any concrete
class that extends the base is forced to override it.
Cheers,
Lyman
--- Robert Barrell <games@rdbhn.org> wrote:
> Lyman Hurd wrote:
>
> >I must say that adding a command to game.cpp is an
> >ambitious step! Given that sgf is a way to display
> a
> >game, perhaps you might be able to set up a game
> >option "I want to receive the game in sgf format"
> and
> >then override the displayboard method? This would
> not
> >require any changes at the level of game.cpp (I
> could
> >help step through the steps it would take).
> >
> >
> If I interpret your response correctly, that would
> mean that any game
> started with the sgf option would only (perhaps only
> for one player)
> deliver SGF for the duration of the game. Unless
> there were a more
> direct interface between SGF and the PBM server
> (i.e. UGS or GMP
> protocol), that would be of limited usefulness. Even
> the client programs
> for IGS, NNGS, KGS, et al, don't work directly with
> SGF, however, but
> have commands to allow users to download SGF. Thus,
> it's really more
> appropriate that the normal flow of the game
> continue as it is, but that
> there be a separate method by which SGF may be
> generated when wanted.
> If that kind of functionality may be accomplished in
> the manner you are
> offering, by all means, continue.
>
> On the other hand, the only thing that doesn't work
> from my current
> coding of sgf as a command are having it work from
> within go.cpp, and
> adding code to return an error if the command is
> called for other games.
>
> Would it be correct to say of C++ that, if the sgf
> function were created
> within the Game class, and set up to return 0, then
> every game would
> inherit that version of the function unless the game
> specifically
> contained its own instance of an sgf function to
> replace it? If so, of
> my originally stated issues, the only one that would
> really need to be
> addressed is how to get the function to work from
> within the particular
> game module.
>
> >It has been a while since I looked at sgf. Is it
> in
> >XML?
> >
> No idea: I have never looked at XML. Here more
> info:
> http://www.red-bean.com/sgf/
>
>
> 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.
>
>