From 5846773a84b629765b6a7236bb6363bc4e34ab94 Mon Sep 17 00:00:00 2001 From: Raymond Hogenson Date: Sun, 19 Aug 2018 00:45:11 -0400 Subject: Move some code around and improve abstraction This doesn't change the functionality of the game at all (ideally), but makes it easier to refactor and to add new enemies and new stages, which is really the end-goal of this whole thing. --- src/player.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/player.rs') diff --git a/src/player.rs b/src/player.rs index 996e554..fa2abfa 100644 --- a/src/player.rs +++ b/src/player.rs @@ -112,13 +112,13 @@ impl state::Positioned for Player { fn y(&self) -> i32 { self.y } - fn radius(&self) -> u32 { + fn radius() -> u32 { 13 } } impl state::Drawable for Player { - fn center(&self) -> (u32, u32) { + fn center() -> (u32, u32) { (30, 19) } } -- cgit v1.3.1