E6F2AEXPQX2ST5SKAAUQ3KXOAHKXRJJZHYOYY3R7RNQRUGAJDCNAC
XSS4V63LEXPZFXB7E6GGOZYOGMDF7GV4V6J647MFZMFWFOIYS2HAC
4YYL4VTYM7SVQG5KUT6AJHMABLCOC4LQESBUWHUZ7OQCKJTM4MAQC
WT7LSRGIWNL2EEDANTK7ZDMW2WEYSD72AV6NXSEW5AIEEINCBYRAC
JEHKAQUULRXERBVBF6KAJU5RPYGQ2YP7LGNOOVM3CRXQNBV4SPXAC
ZJPL7VNQEYASQ7QIUCR3X2IPWF5MAR6WX7VY6OWMRDMPJK7GYWIAC
C5VVJ5SOXXMIWNHCY4BLV5JOXDLDSFGP5QI7WWB74XIZ4JJMIBVAC
JPTYS433ESGA2UUNKQT4JMAWFU7KVIU7F5RKDZTUR7RR5A2COBVQC
OK5CKW6E72XAZTRJUWSKFPJBPZYNIWQGVXFR5ARSJHB6EIBMU6WQC
5TH3AA466T4JIICGT3LTLJ554X62KF36XZUXKR5MIAXVWAGQQHWQC
Y4AQJ5RDUWK2F4WBVYTWVU6XCUZGL7JYFK34CT7FBMXBJ24ICSHAC
MLUGR2LLRTENFPCXBML4VQKWNE5QURMC7RJDE3AQYZXAJWOWILDQC
SMYRM2CFBM7BJYHAUIJYTSORS2V6O5GAHRSY2K6ELGOM3OF5VHCQC
AATEG4HIQU76ZKAOEHG2QUE75HB2QASKDQIA7CSU5AIMXWZICJ2AC
CT3VONTOEWK5SOJ64L7II6NUITVM2S73UEC4UXXVAKBB4JEUOXKQC
/// Increase the number of planks used for this row
pub fn add_used_planks(&mut self) {
self.planks_used += 1;
/// Return how many planks/pieces are in this row
pub fn get_used_planks(&mut self) {
self.planks.len();
// Add the new plank to coverage, coverage is
// thus the coordinate from origin
self.add_coverage(plank.length());
// There is always a cut at the end of a row
// only add Cut if less than this
let coordinate = self.get_coverage();
if coordinate < self.row_max_length {
self.cut_coordinates.push(Cut::new(coordinate));
}
//
// Check if some started plank is available
// otherwise grab a new plank from MaterialStorage
let mut plank = match ms.get_used() {
Some(plank) => plank,
None => ms.get_new()?,
};
let mut plank;
if plank.length() < PLANKMIN {
// Check if the plank is too short, then take a new one
ms.discard_unusable(plank);
// Take a new plank and continue
plank = ms.try_get_used()?;
row.add_used_planks();
}
// Get a plank, used or new, and continue
plank = ms.try_get_used()?;