Fix station type for multistation

This commit is contained in:
hal8174 2025-05-11 16:57:30 +02:00
parent d26449195b
commit 0f6c96f737
3 changed files with 90 additions and 36 deletions

View file

@ -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"),
}
})