Convert station to abstraction
This commit is contained in:
parent
2f12802507
commit
e969ba848b
6 changed files with 522 additions and 448 deletions
|
|
@ -6,7 +6,7 @@ fn main() {
|
|||
let b2 = BlueprintString::Blueprint(generate_4_lane_balancer2());
|
||||
|
||||
println!("{}", serde_json::to_string_pretty(&b).unwrap());
|
||||
println!("{}", serde_json::to_string_pretty(&b).unwrap());
|
||||
println!("{}", serde_json::to_string_pretty(&b2).unwrap());
|
||||
|
||||
println!("{}", encode(&serde_json::to_string(&b).unwrap()));
|
||||
println!("{}", encode(&serde_json::to_string(&b2).unwrap()));
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ fn main() {
|
|||
);
|
||||
|
||||
inner_inner_b.push(BlueprintBookEntry::new(
|
||||
BlueprintString::Blueprint(blueprint),
|
||||
BlueprintString::Blueprint(blueprint.to_blueprint()),
|
||||
l as u32,
|
||||
));
|
||||
}
|
||||
|
|
@ -119,14 +119,10 @@ fn main() {
|
|||
beltspeed,
|
||||
belttype,
|
||||
} => {
|
||||
let b = BlueprintString::Blueprint(basic_station(
|
||||
load,
|
||||
locomotives,
|
||||
length,
|
||||
outputs,
|
||||
beltspeed,
|
||||
belttype,
|
||||
));
|
||||
let b = BlueprintString::Blueprint(
|
||||
basic_station(load, locomotives, length, outputs, beltspeed, belttype)
|
||||
.to_blueprint(),
|
||||
);
|
||||
|
||||
// println!("{}", serde_json::to_string_pretty(&b).unwrap());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue