Removed old code
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 7 Feb 2021 15:44:13 +0000 (16:44 +0100)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 7 Feb 2021 15:44:13 +0000 (16:44 +0100)
src/core/game.rs

index 8fbbef0..e7eac23 100644 (file)
@@ -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
     }