diff options
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), } } } |