From ae4e10f00eab3c9a7a9f5239392e67ef3c39fb1a Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Fri, 24 Nov 2017 03:42:02 -0600 Subject: -made all character variables private -moved path calculation to list level -moved needs_path to a function --- src/view.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/view.rs') 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(); -- cgit v1.2.3