[fpc-pascal] Re: Forward declarations
    Timothy Groves 
    the.tail.kinker at gmail.com
       
    Mon Dec 26 23:36:57 CET 2011
    
    
  
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.
    
    
More information about the fpc-pascal
mailing list