Advanced Hands-on Rust B2.0: Additional changes required for Bevy optimised rng

@herbert

As well as the changes noted on P64 for pig/src/main.rs, there are a couple more required:

  • In function player: mut rng: ResMut<Random> changes to
    mut rng: ResMut<RandomNumberGenerator>
  • let new_roll: = rng.0.range(1..=6) becomes let new_roll = rng.range(1..=6)
    Both of these changes are also applicable to function cpu.

The definition for the Random struct can also be removed, but this isn’t a show stopper.

I know you have all these, as the downloadable copy of src/main.rs already has the changes included.