Other defaults
[?]
Nov 19, 2020, 8:22 PM
Y4AQJ5RDUWK2F4WBVYTWVU6XCUZGL7JYFK34CT7FBMXBJ24ICSHACDependencies
- [2]
USO5PZWOStart with the print function, separate mutable and immutable functions - [3]
3H2BGWRGWIP - [4]
2USDM5CHWIP for more generic - [5]
ES2PMPT4Using structures instead - [6]
MLUGR2LLAdd default impl and some basic plank logic - [7]
ZJPL7VNQSeparate planks from main - [8]
CT3VONTOIntroduce PLANKMIN and work with the neverending rows - [9]
C5VVJ5SOPrint how many rows - [10]
UPCMFGXFPrint more about the room and define PLAY - [11]
F3GMCMWTMerge branch 'master' into sovrum - [12]
VSG6UWDYCan now build floors - [13]
5TH3AA4610 mm extra space
Change contents
- replacement in src/main.rs at line 7
static PLANKMAX: u32 = 2010;//static PLANKMAX: u32 = 2010;/// The smallest allowable plank length//static PLANKMIN: u32 = 200;//static PLANKWIDTH: u32 = 185;//static PLAY: u32 = 20;//static SAWBLADE: u32 = 10;//static ROOMLENGTH: u32 = 3800;//static ROOMLENGTH: u32 = 1000;//static ROOMDEPTH: u32 = 555;//static ROOMDEPTH: u32 = 2800;/// The length of a new plank//static PLANKMAX: u32 = 2200;static PLANKMAX: u32 = 800; - replacement in src/main.rs at line 23
static PLANKWIDTH: u32 = 185;static PLANKWIDTH: u32 = 100; - replacement in src/main.rs at line 27
static ROOMLENGTH: u32 = 1000;static ROOMDEPTH: u32 = 555;static ROOMLENGTH: u32 = 5000;static ROOMDEPTH: u32 = 1000; - replacement in src/main.rs at line 37
ROOMLENGTH + PLAY,ROOMDEPTH + PLAYROOMLENGTH,ROOMDEPTH - replacement in src/main.rs at line 46
floor_print(finished_floor);floor_print(&finished_floor); - edit in src/main.rs at line 48
//println!("Number of rows: {}", finished_floor.rows_count()); - replacement in src/main.rs at line 50
fn floor_print(floor: Floor) -> () {for row in floor.rows().iter() {fn floor_print(floor: &Floor) -> () {let printmax = 100;let mut plank_count = 0;let mut plank_count_sum = 0;for (num, row) in floor.rows().iter().enumerate() {plank_count = row.planks_count();plank_count_sum += plank_count; - replacement in src/main.rs at line 61
println!("plank: {:#?}", plank);//println!("plank: {:#?}", plank);print!("|{:-^10}|", plank.length());// Calculate the parts needed for printing//let parts = printmax / plank_count as - edit in src/main.rs at line 83
println!("row: {:#?}", num + 1); - edit in src/main.rs at line 87
println!("Number of rows: {}", floor.rows_count());println!("Number of planks used: {}", plank_count_sum); - edit in src/main.rs at line 93
println!("coverage: {:#?}", floor.get_coverage());