summaryrefslogtreecommitdiff
path: root/src/ship.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ship.rs')
-rw-r--r--src/ship.rs8
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),
}
}
}