Courses‎ > ‎Intro to CS - Full Year‎ > ‎Fall‎ > ‎Dyrland-Weaver‎ > ‎Work‎ > ‎

Work 12: 11/18

posted Nov 18, 2019, 11:46 AM by JonAlf Dyrland-Weaver
Add the following to your redVblue program from last week:
  • Turtles should have an energy property.
  • Patches should have a damage property.
  • When a bomb is set, it’s damage should be a random number in the range [1, 10].
  • Turtles should start with 10 energy, and die when their energy is 0.
  • When a turtle lands on a bomb, the bomb should go off, and the turtle’s energy should be reduced by the bomb’s damage amount.
  • Feel free to play around with these values after you have this base version working.
Submit this as redVblue_2