Simulating Life

Just another UMass Boston Blogs site

review code

| 1 Comment

this code what does is make the rabbit eat grass and then when their energy goes up they goes to the rabbit warren and give birth and then they came out so can you see if my codes are right.

One Comment

  1. a few things (top to bottom; then left to right):
    – “set my rabbit energy to my rabbit energy -0.00” doesn’t do anything
    you want to set it to energy – 0.01 (or some non-zero value)
    – why count rabbits within 5 steps but face towards one within 10 steps??
    – you need to conserve energy on birth – talk to Deb, Melisa, Atu, etc about this
    – also, your rabbits breed wherever they collide, if you want to have them only breed in the warrens, you’ll have to change your code

Leave a Reply

Required fields are marked *.


Skip to toolbar