diff options
| author | Raymond Hogenson <rhogenson@posteo.net> | 2018-08-19 00:45:11 -0400 |
|---|---|---|
| committer | Raymond Hogenson <rhogenson@posteo.net> | 2018-08-19 00:45:11 -0400 |
| commit | 5846773a84b629765b6a7236bb6363bc4e34ab94 (patch) | |
| tree | 1d0df0ee8d99f91b78b4adca6086ee09255502d3 /src/player.rs | |
| parent | 4206ccc4d824da2a02caf8d8b6f1130c2d1f8ba3 (diff) | |
| download | stallman-shooter-5846773a84b629765b6a7236bb6363bc4e34ab94.tar.zst | |
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.
Diffstat (limited to 'src/player.rs')
| -rw-r--r-- | src/player.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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) } } |
