Fix station type for multistation
This commit is contained in:
parent
d26449195b
commit
0f6c96f737
3 changed files with 90 additions and 36 deletions
|
|
@ -75,12 +75,16 @@ fn main() {
|
|||
s.contains('s'),
|
||||
)
|
||||
}
|
||||
"e" => StationSpec::new_empty(
|
||||
locomotives.parse().expect("parsing locomotive count"),
|
||||
wagons.parse().expect("parsing wagon count"),
|
||||
format!("test"),
|
||||
s.parse().expect("Unable to parse space"),
|
||||
),
|
||||
"e" => {
|
||||
let (left, right) = s.split_once('-').expect("parsing space");
|
||||
StationSpec::new_empty(
|
||||
locomotives.parse().expect("parsing locomotive count"),
|
||||
wagons.parse().expect("parsing wagon count"),
|
||||
format!("test"),
|
||||
left.parse().expect("Unable to parse left space"),
|
||||
right.parse().expect("Unable to parse right space"),
|
||||
)
|
||||
}
|
||||
_ => panic!("unknown station type"),
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue