From afc2bb16b6f16b6e18cd756556a37a756dc5bae1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomas=20Wenstr=C3=B6m?= Date: Sun, 7 Feb 2021 16:44:13 +0100 Subject: [PATCH] Removed old code --- src/core/game.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/core/game.rs b/src/core/game.rs index 8fbbef0..e7eac23 100644 --- a/src/core/game.rs +++ b/src/core/game.rs @@ -287,23 +287,6 @@ impl Object for Boll { ..*self })); } - // let x = (self.pos.x / lvl.grid.cell_size.width as f64).min(lvl.grid.size.width as f64 - 1.0).max(0.0) as usize; - // let y = (self.pos.y / lvl.grid.cell_size.height as f64).min(lvl.grid.size.height as f64 - 1.0).max(0.0) as usize; - // if lvl.grid.cells[x][y] { - // if self.bounces == 0 { - // return Dead - // } - // self.vel *= -0.25; - // self.pos += self.vel; - // self.bounces -= 1; - // use rand::distributions::{Distribution, Normal}; - // let mut rng = rand::thread_rng(); - // let a = Radians(self.vel.to_radians().0 + Normal::new(0.0, 0.75).sample(&mut rng)); - // objects.push(Box::new(Boll { - // vel: Point::from(a) * Normal::new(1.0, 0.25).sample(&mut rng) * self.vel.length(), - // ..*self - // })); - // } Alive } -- 2.11.0