diff options
author | tom barrett <spalf0@gmail.com> | 2018-02-21 08:47:21 -0600 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2018-02-21 08:47:21 -0600 |
commit | 492b31ffd13d4def86050d1db31c5c2e59b670ab (patch) | |
tree | 915f4243497dcc3a19148e745922285364e5ad8a /src/ship.rs | |
parent | d42a28c46057c386d161bfe438302e2314f0a6f6 (diff) |
-moving engines shows change on dashboard
Diffstat (limited to 'src/ship.rs')
-rw-r--r-- | src/ship.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ship.rs b/src/ship.rs index fd55ca9..f791809 100644 --- a/src/ship.rs +++ b/src/ship.rs @@ -1,12 +1,14 @@ #[derive(Serialize, Deserialize, Debug)] pub struct Ship { - pub location : (isize, isize, isize) + pub name : String, + pub location : (isize, isize, isize), } impl Ship { - pub fn new() -> Ship { + pub fn new(name : &str) -> Ship { Ship { - location : (0,0,0) + name : String::from(name), + location : (0,0,0), } } } |