summaryrefslogtreecommitdiff
path: root/src/view.rs
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@siu.edu>2017-11-24 03:42:02 -0600
committerTom Barrett <tombarrett@siu.edu>2017-11-24 03:42:02 -0600
commitae4e10f00eab3c9a7a9f5239392e67ef3c39fb1a (patch)
treee6ca958fe534adc91f898c3212a0f115122af9fa /src/view.rs
parenta853a837b8cb991d8c55496401bef02275139c4e (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.rs5
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();