summaryrefslogtreecommitdiff
path: root/src/map.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/map.rs
parenta853a837b8cb991d8c55496401bef02275139c4e (diff)
-made all character variables private
-moved path calculation to list level -moved needs_path to a function
Diffstat (limited to 'src/map.rs')
-rw-r--r--src/map.rs5
1 files changed, 3 insertions, 2 deletions
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) {