Rework printout to use double rows

AfoHT
Jan 26, 2024, 9:56 PM
OWEKMGGTOFZCAHDKE7P7QSNS6PRHWJCPBVLAZR7LQCGVMON4C52AC

Dependencies

  • [2] 6Z5FXY2J Print includes play on each side
  • [3] E6F2AEXP Fix floorbuilding
  • [4] JPTYS433 Cleanup, clippy
  • [5] 6ODVKCN4 Fix printouts of relative lengths
  • [6] OK5CKW6E Rework everything, use references
  • [7] XSS4V63L Change scale factor wider for more detail
  • [8] 4IFBDTVW Store and print row total length
  • [9] Y4AQJ5RD Other defaults
  • [10] USO5PZWO Start with the print function, separate mutable and immutable functions
  • [*] 5TH3AA46 10 mm extra space

Change contents

  • replacement in src/bin/main.rs at line 30
    [4.319][3.742:769]()
    let scalefactor = 100;
    [4.319]
    [4.700]
    let scalefactor = 50;
  • replacement in src/bin/main.rs at line 35
    [4.787][4.787:855]()
    //let comp = 30 * row.planks_count();
    let comp = 0;
    [4.787]
    [4.0]
    let comp = 50 * row.planks_count();
  • replacement in src/bin/main.rs at line 37
    [4.32][2.0:27]()
    print!("+{PLAY}");
    [4.32]
    [4.720]
    print!(" "); // Prefix space for play
  • replacement in src/bin/main.rs at line 42
    [4.937][4.339:398](),[4.398][4.856:926]()
    // Print half the relative length of the plank
    for _ in 0..((plank.length() - comp) / scalefactor) / 2 {
    [4.937]
    [4.456]
    // Print the relative length of the plank
    for _ in 0..((plank.length()) / scalefactor) {
  • edit in src/bin/main.rs at line 46
    [4.499]
    [4.808]
    }
    println!("|");
  • edit in src/bin/main.rs at line 49
    [4.809]
    [4.500]
    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
    [4.540][4.927:973]()
    print!("{:-^8}", plank.length());
    [4.540]
    [4.809]
    print!("{: ^6}", plank.length());
  • replacement in src/bin/main.rs at line 57
    [4.810][4.587:648]()
    // Print the rest of the plank including the end
    [4.810]
    [4.974]
    // Remainder of the plank
  • replacement in src/bin/main.rs at line 59
    [4.1044][4.706:735](),[4.706][4.706:735]()
    print!("-");
    [4.1044]
    [4.1378]
    print!(" ");
  • replacement in src/bin/main.rs at line 62
    [4.1425][4.1045:1112]()
    // Print the end of the row of planks
    print!("|");
    [4.1425]
    [2.28]
  • edit in src/bin/main.rs at line 65
    [4.144]
    [4.1425]
    print!(" "); // Prefix space for play
    for plank in row.planks().iter() {
    print!("|");
    // Print the bottom row of the plank
    for _ in 0..(plank.length() / scalefactor) {
    print!("-");
    }
    }
    println!("|");
    println!();