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/map.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map.rs') diff --git a/src/map.rs b/src/map.rs index 6546917..7794d65 100644 --- a/src/map.rs +++ b/src/map.rs @@ -60,8 +60,9 @@ impl Map { } pub fn draw(&self, character : &Character) { - self.window.attron(ColorPair(character.color)); - self.window.mvaddch(character.location.0, character.location.1, character.symbol); + self.window.attron(ColorPair(character.get_color())); + let location = character.get_location(); + self.window.mvaddch(location.0, location.1, character.get_symbol()); } pub fn draw_box(&self, first_location : Location, second_location : Location) { -- cgit v1.2.3