Six prey squares will be spread throughout the space on the screen or "habitat." Six is the initial number of prey for generation one. Any prey squares that are touching the predator squares after one toss have been captured and eaten. Each predator must capture at least three prey in order to survive. (When the number of prey is low, it may be impossible for a predator to survive.) Any prey captured and any predators that did not survive (not touching at least three prey squares) will be removed from a round. The remaining "prey" and "predator" population doubles each generation. If all of the predators died during the last round, a new predator will move into the habitat for the next round. This means that if all predators die in a given round, one "new arrival" will be put in to continue the cycle. If a predator was able to capture at least three prey in one toss, that predator will survive and be able to reproduce. This means that for every predator that captured at least three prey, an additional predator is added for the next generation.
This is a predator-prey simulation done for my class in FLVS, comprehensive science, assignment 6.01.