Trigger
event <infection_step> does a single iteration of infection. It
is called when you press <a>.

At
first we set pre-infection edge tile list <temp_list> and
post-infection edge tile list <infected_list>.
<infected_list>
is empty at the beginning.

Then
we go througheach tile actor of pre-infection
edge tile list. Set that actor's animation to animation of being
surrounded by 4 infected tiles. Send information to <infect>
trigger event that you would like to infect tiles around you. We need
to set <checked_tile> before every <infect> trigger event
because <checked_tile> is changed upon execution of <infect>
trigger event.

<infect>
trigger will determine if tile is infected or uninfected. If it's
uninfected it will infect it - set proper value in matrix
<ground_list> (matrix responsible for keeping status of tile;
Part 3) and add the newly infected tile to <infected_list>.

After
infection process is done we need to update animation for
post-infection edge tiles based on their surroundings. It is done by
<animate>.

We
add event <when <a> pressed> so that we can call manually
single iteration of infection.

Infection
over time

->
infection_behavior -> when created

->
infection_behavior -> do every <1> seconds

->
infection_behavior -> when <f> pressed

Infection
over time is nothing more than calling <infection_step> once
every <some time>. We add <do every <1> seconds> to
achieve it. Since we don't want infection to spread until we tell it
to do so we add <auto_infect>
condition. In when created we set value of <auto_infect> to
false. Value of <auto_infect > can be changed to <true>
upon pressing <f>.

Events
allowing infection over time

Extras:
counter-infection algorithm

Sometimes
we want for ground to regain lost ground. For example if the
infecting race lost supply that allowed the infection. The biomass on
the infected tile is dying so neutral ground regains it. The
algorithm for this is very similar to that of infection.

We
have infected area but once it gets big we will end up with big
boring purple plane. If infected area is big enough we can build some objects
inside infected area. The objects themselves can be build up from
tiles.

This
will require checking once in a while values in <ground_list>
to answer the question if we have enough infected tiles to build.
Since it's only graphical effect with no influence on gameplay we
don't need to do it often.

Infected
area with added pools of green goo(sized 3x3) and grouped infected
tiles(2x2).