tel-ran-de / FE12-Basic

2 stars 12 forks source link

HW 2020-11-23 - Running away monster #109

Open isalexlog opened 3 years ago

isalexlog commented 3 years ago

Modify update method of monster in the following way:

  1. Generate random number that defines how much time monster will move.
  2. Generate random number that defines a direction (up, down, left, right and their combinations)
  3. Generate random number that defines monster's speed.
  4. Move monster for the defined in (1) period of time in the direction of (2) and with speed in (3).