summaryrefslogtreecommitdiff
path: root/src/ships.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2017-05-13 21:01:14 +0200
committerJustin Worthe <justin.worthe@gmail.com>2017-05-13 21:01:14 +0200
commit872529bc9a13b1923047a7f9308abaa40eb63d3c (patch)
tree9da73efa835896ee206daeb262fde550aaa99907 /src/ships.rs
parent36b72bfef7b7b8dea94546d11704ec529091bce1 (diff)
Random placement
Diffstat (limited to 'src/ships.rs')
-rw-r--r--src/ships.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ships.rs b/src/ships.rs
index 8058d4a..e21b20e 100644
--- a/src/ships.rs
+++ b/src/ships.rs
@@ -27,6 +27,8 @@ impl fmt::Display for Ship {
impl Ship {
pub fn length(&self) -> u16 {
+ use Ship::*;
+
match self {
&Battleship => 4,
&Carrier => 5,