Swap rows after adding the plank
Dependencies
- [2]
NJC3HBR6Initial attempt to not get too short planks at end of row - [3]
GKK5DEP5Calculate coordinate once, swap rows if too close - [4]
MLUGR2LLAdd default impl and some basic plank logic - [5]
RYT4PXCXCut coordinate is relative the new plank - [6]
4YYL4VTYIntroduce Cut - [7]
E6F2AEXPFix floorbuilding - [8]
FMZGVTH3Remove some debug printouts - [9]
LRBLK2ZMAdd env_logger - [10]
LQ4TT46NThese conditions are not mutually exclusive - [11]
ZJPL7VNQSeparate planks from main - [*]
5TH3AA4610 mm extra space - [*]
JPTYS433Cleanup, clippy
Change contents
- edit in src/bin/main.rs at line 76[2.463]→[2.463:473](∅→∅),[2.473]→[4.1186:1238](∅→∅),[4.1186]→[4.1186:1238](∅→∅),[4.1313]→[4.1313:1385](∅→∅),[4.1385]→[3.0:285](∅→∅),[3.285]→[4.0:14](∅→∅),[4.1570]→[4.0:14](∅→∅)
}if let Some(adjacent_row) = adjacent_row {// Check if the new plank lands too close to a previous cut// or a new onelet coordinate = row.get_coverage() + required_length;if !adjacent_row.check_if_cut_is_valid(Cut::new(coordinate)) {log::info!("Invalid cut at {coordinate}!!! Swapping places");row.swap_latest(ms);} - edit in src/bin/main.rs at line 103[14.1644][14.1777]
}}if let Some(adjacent_row) = adjacent_row {// Check if the newly added plank lands too close to a previous cut// or a new onelet coordinate = row.get_coverage();if !adjacent_row.check_if_cut_is_valid(Cut::new(coordinate)) {log::info!("Invalid cut at {coordinate}!!! Swapping places");println!("{row}");row.swap_latest(ms);