Skip to content

Commit b79857b

Browse files
committed
update for rand
1 parent 5a5a163 commit b79857b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/game/alien_cake_addict.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn setup(commands: &mut Commands, asset_server: Res<AssetServer>, mut game: ResM
113113
.map(|j| {
114114
(0..BOARD_SIZE_I)
115115
.map(|i| {
116-
let height = rand::thread_rng().gen_range(-0.1, 0.1);
116+
let height = rand::thread_rng().gen_range(-0.1..0.1);
117117
commands
118118
.spawn((
119119
Transform::from_xyz(i as f32, height - 0.2, j as f32),
@@ -304,8 +304,8 @@ fn spawn_bonus(
304304
return;
305305
}
306306
}
307-
game.bonus.i = rand::thread_rng().gen_range(0, BOARD_SIZE_I);
308-
game.bonus.j = rand::thread_rng().gen_range(0, BOARD_SIZE_J);
307+
game.bonus.i = rand::thread_rng().gen_range(0..BOARD_SIZE_I);
308+
game.bonus.j = rand::thread_rng().gen_range(0..BOARD_SIZE_J);
309309
game.bonus.entity = commands
310310
.spawn((
311311
Transform {

0 commit comments

Comments
 (0)