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

Re: [werewolf] Werewolf coding



On Thu, Aug 19, 2004 at 09:45:13AM -0500, Ted Rathkopf wrote:
> > Yes, but that raises a point.  You will need to give yourself the
> > ability to end a round or even the game on any random chat coming
> > in.  We want to avoid making a bunch of spaghetti in there, so
> > perhaps the front-end of the code needs to be rewritten so we don't
> > just jump off to "sub Chat" and be done with it.  (I realize I'm not
> > being very clear here, but bear with me.)  Geoff suggested that we
> > also queue up messages going out in some way, so we can send out
> > that incoming chat but also build in "oh by the way, the day ended."
> 
> How about adding a PreProcess call in Run?  Or do we want it to be a
> PostProcess so that if someone has just sent in a vote, it gets
> handled before we check for time limits?

The new Run has both a StartProcessing and a FinishProcessing, that are called
every time a command comes in.

I hadn't found a use for StartProcessing, but FinishProcessing is the
one place where all the day/night end checking now lives.

Would it be possible for richard to put in a cronjob that would 'tickle'
each game once an hour or something too see if there was any timed
activity required?
Or you could probably even let the code just queue it's own cron jobs.

Geoff.
kryten.
etc.