// ASCII cross-section of a stone furnace firing, with a temperature digit per cell (0-9), printed // at intervals. Usage: node tools/experiments/section.js [WALL_MATERIAL] (default STONE). const { load, flatWorld, rect, ticks, dump } = require('../../test/harness'); const { run } = load(); const C = n => run(n); flatWorld(run, 200, 140, 90); const wall = C(process.argv[2] || 'STONE'); rect(run, 77, 66, 78, 95, wall); rect(run, 105, 66, 106, 95, wall); rect(run, 77, 66, 106, 67, wall); run(`for (let y=66;y<68;y++) for (let x=91;x<93;x++) setCell(y*W+x, EMPTY, AMB[y], 0)`); // dig a basin into the ground so the furnace has a floor of the wall material run(`for (let y=90;y<=95;y++) for (let x=79;x<=104;x++) setCell(y*W+x, y>=94? ${wall} : EMPTY, AMB[y], 0)`); run(`{ let r=mulberry32(5); for (let y=76;y<=93;y++) for (let x=79;x<=104;x++) setCell(y*W+x, r()<0.3 ? CUORE : COAL, AMB[y], 0); }`); run(`for (let k=0;k<40;k++){ toolIgnite(84,75); toolIgnite(99,75); simTick(); }`); for (const t of [600, 1200, 1200, 1200]) { ticks(run, t); console.log('--- +' + t); dump(run, 75, 64, 108, 97, true); }