diff --git a/src/main.rs b/src/main.rs index f27aa71..d00d10e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,6 @@ trait Drawable { fn rate(&self) -> u32; fn draw_and_move(&mut self, display: &mut Display); - fn draw_png(&mut self, display: &mut Display, x: i32, y: i32); } impl BouncingImage { /// Initializes a new BouncingImage. @@ -84,13 +83,6 @@ impl BouncingImage { } - - -} -impl Drawable for BouncingImage { - fn rate(&self) -> u32 { - return self.rate; - } /// Draws a PNG image at the given coordinates. fn draw_png(&mut self, display: &mut Display, x: i32, y: i32) { @@ -103,7 +95,14 @@ impl Drawable for BouncingImage { } } } + } + +} +impl Drawable for BouncingImage { + fn rate(&self) -> u32 { + return self.rate; } + /// Draws the image and updates its position. fn draw_and_move(&mut self, display: &mut Display) { self.draw_png(display, self.x, self.y);