> For the "worlds fastest scrabble" algorithm, a pretty good way to break up
> the computation is by the anchor square.  The routine to compute the best
> move for a given anchor square is already fairly self contained, so you
> just call that repeatedly for each anchor square and check for events in
> between.  (That's what I did for my Newton version of the scrabble
> algorithm, and it worked great.)

With two blanks in the tray you can spend several seconds on an anchor
square, especially if it's wide open (e.g. the first move of the
game).  I'm checking at considerMove() and then throwing back up to
the routine that's called per anchor square.  At that point I can
package up some meaningful state, though I have to repeat (when
restarting) everything that particular invocation of the anchor square
routine had done.

What do the rest of you think? :-)

> The other way is a little more complicated -- you check for events inside
> the algorithm, and if you find an event that needs processing (like a pen
> down event in a particular area), you can put the event back on the event
> queue and then return.  The top-level form event handler will then get to
> process the user event again.

So an event placed on the queue winds up at the queue's head?  How do
I stick one at the back where it'll be processed last.  Is there some
basic API I've overlooked?

--Eric

******************************************************************************
* From the desktop of: Eric House, [EMAIL PROTECTED]                            *
*     Check out Crosswords for PalmOS: <http://www.peak.org/~fixin/xwords>   *
*          "The instructions said 'Win98 or better' -- so I installed Linux" *
******************************************************************************

Reply via email to