Can now build floors
[?]
Jul 11, 2020, 9:35 PM
VSG6UWDYMGCJHOVD5BI5UNAAYLVL6REAAJLI7OXUGCSXLJZTV36QCDependencies
- [2]
ZJPL7VNQSeparate planks from main - [3]
5TH3AA4610 mm extra space - [4]
F3GMCMWTMerge branch 'master' into sovrum - [5]
2USDM5CHWIP for more generic - [6]
3H2BGWRGWIP - [7]
MLUGR2LLAdd default impl and some basic plank logic - [8]
RQRFFUF6Can build the first basic row - [9]
ES2PMPT4Using structures instead - [10]
CT3VONTOIntroduce PLANKMIN and work with the neverending rows
Change contents
- edit in src/floor.rs at line 51
} else if measure == 0 {panic!("Cutting a plank to length 0 does not make sense!"); - edit in src/floor.rs at line 54
- edit in src/floor.rs at line 86
planks_used: u32, - edit in src/floor.rs at line 95
planks_used: 0, - replacement in src/floor.rs at line 158
pub fn is_complete(&self) -> bool {pub fn get_complete(&self) -> bool { - edit in src/floor.rs at line 160
}/// Mark this floor as completepub fn set_complete(&mut self) -> () {self.complete = true; - edit in src/floor.rs at line 166
- edit in src/floor.rs at line 172
/// Add another row to this floor - edit in src/floor.rs at line 175
}/// Get the number of plank rows for this floorpub fn get_coverage(&self) -> u32 {self.coverage}/// Increase how much of the row is filledpub fn add_coverage(&mut self, coverage: u32) -> () {self.coverage += coverage; - replacement in src/main.rs at line 36
/*while floor.coverage <= ROOMDEPTH {while floor.get_coverage() < ROOMDEPTH { - replacement in src/main.rs at line 38
floor.coverage += PLANKWIDTH;floor.add_coverage(PLANKWIDTH); - replacement in src/main.rs at line 40
*/floor.set_complete(); - edit in src/main.rs at line 42
floor.add(build_row()); - replacement in src/main.rs at line 52
while row.get_coverage() <= ROOMLENGTH {while row.get_coverage() < ROOMLENGTH { - replacement in src/main.rs at line 94
println!("Row: {:#?}", row);//println!("Row: {:#?}", row);