Mail Archives: djgpp/1998/03/01/23:45:32
x-no-archive:yes
Thomas Womack <mert0236 AT sable DOT ox DOT ac DOT uk> wrote in article
<6c7u5l$mub$2 AT news DOT ox DOT ac DOT uk>...
> Wouldn't it be easier, and not discernably slower, to put
>
> int nextthink;
>
> nextthink=THINKER_RUN;
> nextthink=THINKER_ATTACK;
>
> switch nextthink
> {
> case THINKER_RUN:
> run();
>
> case THINKER_ATTACK:
> attack();
> }
>
> Tom
This is a pretty good solution, but, depending on how the application
develops in the future, it may require a lot of extra coding if other
actions are added to the repotoire later in develpment. See my post for
MHO on a solution to the problem.
Just my $0.02 worth,
Aaron Cosand.
- Raw text -