[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 12:23:58 -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=G4bEmuM6quPpcDvaOYQKY5hiqOUbjXtlvY3JJrxLTyOm7eCRV4vwSpWjKYk8SV2HCR/fRxrnZNugigW0D1HXYavq4hB8BUg8FFmUQpK1D3QB5Rj3sis+NdD9Cma6j0Pxfnj4pnB80mrmVhoqudHQKTjl3tbsqxH7rQHcYtE+uGQ= ;
- In-reply-to: <Pine.LNX.4.33.0509221306050.29103-100000@sharkey.morinda.com>
- Reply-to: pbmserv-dev@gamerz.net
- Sender: owner-pbmserv-dev@gamerz.net
What's really embarassing is that looking at the
codebase I have actually overridden this command
already! That is how "set" options are handled.
Okay, who on earth didn't anyone suggest this as an
avenue for the sgf command...huh :-)...
Cheers,
Lyman
--- John Williams <williams@tni.com> wrote:
> You mean, like if there was a virtual function that
> was called if the
> command did not match any of the built-in commands?
>
> Maybe we could call it UnknownCommand().
>
> :)
>
> ~ John Williams
>
>
> On Thu, 22 Sep 2005, Lyman Hurd wrote:
>
> > 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.
> > >
> > >
> >
> >
> > 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.
>
>