Simulating Life

Just another UMass Boston Blogs site

Melisa’s code review 3/9 11:34PM

| 1 Comment

Since I am simulating natural selection and evolution the green beetles camouflage with the grass and never get eaten by the frog because the frog can’t see the beetles. It will be hard to see the green beetles with a green background so I am choosing lime green instead so that you will be able to see the beetles. There are many ways to tell the frog that it can eat every beetle besides lime green. However the easiest way would be the smallest code that will not slow the program down. This code tells the frog that when on collision with a beetle, delete all beetles unless the color is lime green.

One Comment

  1. cool
    I’d really like to see your code to randomize their colors too….

Leave a Reply

Required fields are marked *.


Skip to toolbar