Each Row stores its maximum length

AfoHT
Jan 21, 2024, 10:33 PM
WT7LSRGIWNL2EEDANTK7ZDMW2WEYSD72AV6NXSEW5AIEEINCBYRAC

Dependencies

  • [2] Q7IWKL57 Calculate required length once and reuse
  • [3] MLUGR2LL Add default impl and some basic plank logic
  • [4] JPTYS433 Cleanup, clippy
  • [5] CT3VONTO Introduce PLANKMIN and work with the neverending rows
  • [6] VSG6UWDY Can now build floors
  • [7] AATEG4HI Remove todo, improve comment
  • [8] MUDVRIBF Fix comparision error
  • [9] ZJPL7VNQ Separate planks from main
  • [10] SMYRM2CF Use the MaterialStorage
  • [11] 4YYL4VTY Introduce Cut
  • [12] OK5CKW6E Rework everything, use references
  • [*] 5TH3AA46 10 mm extra space

Change contents

  • edit in src/lib.rs at line 163
    [3.1797]
    [3.1797]
    row_max_length: u32,
  • edit in src/lib.rs at line 173
    [3.1974]
    [3.1974]
    row_max_length: ROOMLENGTH - 2 * PLAY,
  • edit in src/lib.rs at line 223
    [3.2725]
    [3.2725]
    }
    /// Get the maximum length allowed
    pub fn get_max_length(&self) -> u32 {
    self.row_max_length
  • edit in src/lib.rs at line 229
    [3.2731]
    [3.2731]
  • replacement in src/bin/main.rs at line 105
    [3.1552][3.743:787]()
    while row.get_coverage() < ROOMLENGTH {
    [3.1552]
    [3.578]
    while row.get_coverage() < row.get_max_length() {
  • replacement in src/bin/main.rs at line 126
    [3.443][2.64:118]()
    length if length > (required_length) => {
    [3.443]
    [3.513]
    length if length > required_length => {