[Edu-sig] Life Clock

Andre Roberge andre.roberge at gmail.com
Sat Apr 22 01:47:16 CEST 2006


On 4/21/06, kirby urner <kirby.urner at gmail.com> 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


More information about the Edu-sig mailing list