Skip to content

Commit eff05ba

Browse files
authored
Merge pull request #498 from bvssvni/master
Updated dependencies
2 parents e58ba6f + 6dd62eb commit eff05ba

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ authors = ["bvssvni <bvssvni@gmail.com>"]
66
keywords = []
77

88
[dependencies.piston_window]
9-
version = "0.138.2"
9+
version = "0.139.0"
1010
features = ["batteries"]
1111

12-
[dependencies]
13-
find_folder = "0.3.0"
14-
piston2d-drag_controller = "0.30.0"
15-
piston2d-deform_grid = "0.15.0"
16-
rand = "0.8.5"

examples/snake.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ impl App{
115115
fn gen_apple_coords(&mut self, size: [i32; 2]){
116116
let w: i32 = size[0] / 10;
117117
let h: i32 = size[1] / 10;
118-
let mut rng = rand::thread_rng();
119-
self.apple = [10_i32 * rng.gen_range(0..w), 10_i32 * rng.gen_range(0..h)];
118+
let mut rng = rand::rng();
119+
self.apple = [10_i32 * rng.random_range(0..w),
120+
10_i32 * rng.random_range(0..h)];
120121
for pos in &self.segments{
121122
if *pos == self.apple {
122123
self.gen_apple_coords(size);

0 commit comments

Comments
 (0)