summaryrefslogtreecommitdiff
path: root/src/view.rs
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@siu.edu>2017-11-02 05:51:32 -0500
committerTom Barrett <tombarrett@siu.edu>2017-11-02 05:51:32 -0500
commit2e5f1363e6efff3daefee9fe6388be2332e6fb62 (patch)
treef0e255472120577d3b8699df9bda746b847ed730 /src/view.rs
parent5c495b75f25c324b5e468d0aa80d0699bb5f3fd2 (diff)
-units now move respect impassable locations, syntax more uniform
Diffstat (limited to 'src/view.rs')
-rw-r--r--src/view.rs26
1 files changed, 13 insertions, 13 deletions
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,
}
}