From 2e5f1363e6efff3daefee9fe6388be2332e6fb62 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Thu, 2 Nov 2017 05:51:32 -0500 Subject: -units now move respect impassable locations, syntax more uniform --- src/view.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/view.rs') diff --git a/src/view.rs b/src/view.rs index 8884e18..c19ee63 100644 --- a/src/view.rs +++ b/src/view.rs @@ -2,23 +2,23 @@ extern crate pancurses; use character::Character; -pub struct View{ - width: i32, - height: i32, - row: i32, - col: i32, - window: pancurses::Window, +pub struct View { + width : i32, + height : i32, + row : i32, + col : i32, + window : pancurses::Window, } -impl View{ +impl View { pub fn new((x,y) : (i32, i32), map_window : &pancurses::Window) -> View { let window = map_window.derwin(x,y,0,0).expect("Cannot create derwin."); - View{ - width : x, - height : y, - row : 0, - col : 0, - window: window, + View { + width : x, + height : y, + row : 0, + col : 0, + window : window, } } -- cgit v1.2.3