[General boards] [Winter 2019 courses] [Fall 2018 courses] [Summer 2018 courses] [Older or newer terms]

Seaweed Update


I have questions about the Seaweed growing back every 200 updates. Since it needs to update every 200 times, I want to implement some sort of count.

  1. Do I start this count the instant I run the program? or Do I start the regrowth time count when a Fish eats the first piece of seaweed?
  2. Do I need to restart the count time once another piece of seaweed is eaten? For example, i’m on count 199 and then another piece of seaweed is eaten by a fish, would I reset the time back to 0 or continue the count to 200 and allow the seaweed to regrow.


See Should the Seaweed Growth RESET each time a fish bumps into it?

Short answer: Anything reasonable, but after 200 update()-s, the seaweed should grow