[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: Thu, 22 Sep 2005 06:20:59 -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=1e8eDCasg/ToDVQx2JM6kX+LPa/FzeGO/4luJ0TAA9D8xWUAga9VXA/zhjV4Em6r4p6+YaZT2zSBrPZjY9WLf/W7m2dBin1wxIKgKTAkxRHEpjwf5FR/+X6VgEgUoc+/sLJfYu0378O+GNrUm4NKsZ4mEpBhOB/Pwv8vIjXKzlk= ;
- In-reply-to: <20050922111353.77835.qmail@web53306.mail.yahoo.com>
- Reply-to: pbmserv-dev@gamerz.net
- Sender: owner-pbmserv-dev@gamerz.net
Thinking it over, it hurts my object oriented
sensibilities to extend the base class in this way.
Basically adding interfaces to the base is the last
refuge of a scoundrel.
I think it would be much cleaner to have a command
registry in the base object and let the individual
games register a handler for a given command. That
way we can arbitrarily extend the command set without
ever having to modify the base or worry about
associated incompatibilities.
Just a thought...
Lyman
PS Of course implied here is a willingness to help
code...
--- Lyman Hurd <lhurd@yahoo.com> wrote:
> Right I just mean that a game option was not viable
> in
> that case because it doesn't "know" that lyman wants
> the game listing as "sgf" if the server does not
> know
> it if lyman doing the asking!
>
> Cheers,
>
> Lyman
>
> --- Robert Barrell <games@rdbhn.org> wrote:
>
> > Lyman Hurd wrote:
> >
> > >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.
> > >
> > >
> > Thanks, Lyman. Actually, user context (as in
> > "showas") is not important
> > for SGF. The format is absolute, and the programs
> > that display the
> > games usually have "board flip" options.
> >
> > >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.
> > >
> > >
> > Still working on it. The "not implemented"
> default
> > works, but I'm
> > getting a segmentation fault when the Go version
> of
> > the function is called.
> >
> >
> > 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.
>
>