On 4/21/06, kirby urner <[EMAIL PROTECTED]> wrote: > We're going to want an easy way to phase in time as the key variable, > which can simply mean a runtime mainloop, ala the usual event polling, > and have objects do an update in situ, meaning they get nudged > forward, one by one: [snip] > Alternatively, if we make our animals be internal to the environment > instance, then a single update call to this instance could trigger > individual animal updates internally: > > import jungle > ecosystem = jungle.creation() > > # initialize animals > for i in range(10): > ecosystem.add_animal() # randomizer? > > def mainloop: > while True: > ecosystem.update() # advances environment clock, state changes > # some break or pause condition >
This looks like something that could easily adapted to, and better demonstrated with Pygame. Any reason why you aren't doing this? André > Depending on the kind of animal, it would try adapting in whatever > manner. Tsunami? Birds take flight. > > Kirby _______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
