(rng: &mut ThreadRng)
| 27 | |
| 28 | impl Bunny { |
| 29 | fn new(rng: &mut ThreadRng) -> Bunny { |
| 30 | let x_vel = rng.gen::<f32>() * 5.0; |
| 31 | let y_vel = (rng.gen::<f32>() * 5.0) - 2.5; |
| 32 | |
| 33 | Bunny { |
| 34 | position: Vec2::new(0.0, 0.0), |
| 35 | velocity: Vec2::new(x_vel, y_vel), |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | struct GameState { |
nothing calls this directly
no outgoing calls
no test coverage detected