From 65b9187911c4689346fd791ab318340f7c265fee Mon Sep 17 00:00:00 2001 From: O-01-67 <68935009+O-01-67@users.noreply.github.com> Date: Tue, 14 Jun 2022 11:03:06 -0400 Subject: [PATCH] places all elements LtR TtB use placeAll(number of elements) --- mods/place_all_elements.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mods/place_all_elements.js diff --git a/mods/place_all_elements.js b/mods/place_all_elements.js new file mode 100644 index 00000000..8ae2ce4c --- /dev/null +++ b/mods/place_all_elements.js @@ -0,0 +1,22 @@ +zzzz204689123_array = Object.keys(elements); + + function placeAll(limit=zzzz204689123_array.length) { + paused = true; + counterLol = 0; + loop1: + for(i = 1; i < height; i++) { + loop2: + for(j = 1; j < width; j++) { + if(isEmpty(j,i)) { + if(!zzzz204689123_array[counterLol] || counterLol > limit) { + break loop1; + }; + createPixel(zzzz204689123_array[counterLol],j,i); + counterLol++; + } else { + break loop1; + } + }; + }; + paused = true; + }; \ No newline at end of file