diff options
author | Tom Barrett <tombarrett@siu.edu> | 2017-11-24 03:42:02 -0600 |
---|---|---|
committer | Tom Barrett <tombarrett@siu.edu> | 2017-11-24 03:42:02 -0600 |
commit | ae4e10f00eab3c9a7a9f5239392e67ef3c39fb1a (patch) | |
tree | e6ca958fe534adc91f898c3212a0f115122af9fa /src/view.rs | |
parent | a853a837b8cb991d8c55496401bef02275139c4e (diff) |
-made all character variables private
-moved path calculation to list level
-moved needs_path to a function
Diffstat (limited to 'src/view.rs')
-rw-r--r-- | src/view.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view.rs b/src/view.rs index d62454b..f464da9 100644 --- a/src/view.rs +++ b/src/view.rs @@ -23,8 +23,9 @@ impl View { } pub fn center(&mut self, character : Character, map_window : &pancurses::Window) { - let c = character.location.0 - self.width/2; - let r = character.location.1 - self.height/2; + let location = character.get_location(); + let c = location.0 - self.width/2; + let r = location.1 - self.height/2; let (hh, ww) = map_window.get_max_yx(); |