Rework printout to use double rows
Dependencies
- [2]
6Z5FXY2JPrint includes play on each side - [3]
E6F2AEXPFix floorbuilding - [4]
JPTYS433Cleanup, clippy - [5]
6ODVKCN4Fix printouts of relative lengths - [6]
OK5CKW6ERework everything, use references - [7]
XSS4V63LChange scale factor wider for more detail - [8]
4IFBDTVWStore and print row total length - [9]
Y4AQJ5RDOther defaults - [10]
USO5PZWOStart with the print function, separate mutable and immutable functions - [*]
5TH3AA4610 mm extra space
Change contents
- replacement in src/bin/main.rs at line 30
let scalefactor = 100;let scalefactor = 50; - replacement in src/bin/main.rs at line 35
//let comp = 30 * row.planks_count();let comp = 0;let comp = 50 * row.planks_count(); - replacement in src/bin/main.rs at line 37
print!("+{PLAY}");print!(" "); // Prefix space for play - replacement in src/bin/main.rs at line 42
// Print half the relative length of the plankfor _ in 0..((plank.length() - comp) / scalefactor) / 2 {// Print the relative length of the plankfor _ in 0..((plank.length()) / scalefactor) { - edit in src/bin/main.rs at line 46
}println!("|"); - edit in src/bin/main.rs at line 49
print!("+{PLAY}");for plank in row.planks().iter() {for _ in 0..((plank.length() - comp) / scalefactor) / 2 {print!(" ");} - replacement in src/bin/main.rs at line 55
print!("{:-^8}", plank.length());print!("{: ^6}", plank.length()); - replacement in src/bin/main.rs at line 57
// Print the rest of the plank including the end// Remainder of the plank - replacement in src/bin/main.rs at line 59
print!("-");print!(" "); - replacement in src/bin/main.rs at line 62
// Print the end of the row of planksprint!("|"); - edit in src/bin/main.rs at line 65
print!(" "); // Prefix space for playfor plank in row.planks().iter() {print!("|");// Print the bottom row of the plankfor _ in 0..(plank.length() / scalefactor) {print!("-");}}println!("|");println!();