On 11-12-23 07:31 AM, leledumbo wrote:
Back to high school time, I use it for turn based battle system for a game. I
have two mutually (tail-)recursive procedures where one is the player
movement decision (full with prompts) while the other is the enemy's (some
AI calculation takes the decision). The battle could start ambushed (enemy
first) or preemptive strike (player first). Because of this, the first
procedure to call could be either of the two, and because both are mutually
recursive, one needs to be declared forward.


Thanks! This is a bit more complex than I want for an example in my book, but you've twigged my imagination, and I can use this idea for an example that I can use.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to