summaryrefslogtreecommitdiff
path: root/src/ship.rs
blob: f791809d5705eacb0b0270e8e4d5dd7e52012c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Serialize, Deserialize, Debug)]
pub struct Ship {
    pub name        : String,
    pub location    : (isize, isize, isize),
}

impl Ship {
    pub fn new(name : &str) -> Ship {
        Ship {
            name        : String::from(name),
            location    : (0,0,0),
        }
    }
}