Refactor
[kaka/rust-sdl-test.git] / src / core / game.rs
index 55bb80c..1bdaa8d 100644 (file)
@@ -231,16 +231,6 @@ impl Object for Boll {
        self.vel += lvl.gravity;
        self.pos += self.vel;
 
-       if self.pos.y >= lvl.ground {
-           if self.bounces == 0 {
-               return Dead
-           } else {
-               self.bounces -= 1;
-               self.pos.y = lvl.ground;
-               self.vel.y = -self.vel.y;
-           }
-       }
-
        let x = (self.pos.x / lvl.grid.cell_size as f64).min(lvl.grid.width as f64 - 1.0).max(0.0) as usize;
        let y = (self.pos.y / lvl.grid.cell_size as f64).min(lvl.grid.height as f64 - 1.0).max(0.0) as usize;
        if lvl.grid.cells[x][y] {