Estonian Flag Shortcuts explainer

The aim of this puzzle: Create the Estonian flag with one line of code.

Walkthrough of the solution: When there is a space in the string given to drawBoxes(), it will create a newLine().

Inside of the parentheses of drawBoxes() you need to edit the string. drawBoxes() will look at each character in its string: if it’s a letter, draw a box with the color that letter stands for; if it’s a space, go to a new line. So, drawBoxes('g g') is the same as

drawBox(green);
newLine();
drawBox(green);

To draw the Estonian flag, you need 9 boxes: blue, blue blue, new line, ebony, ebony, ebony, new line, then white, white, white. That means the string that goes inside of drawBoxes() is 'bbb eee www'.
Sample code solution:
(Tap below to reveal)

drawBoxes('bbb eee www');

JavaScript Concepts: Calling Functions, Identifiers
Grasshopper Concepts: drawBoxes()

1 Like

drawBox(bbb kkk www); was incorret?

It should be eee not kkk.

2 Likes

Ok sir thanks thanks sir well help from you

1 Like

Also for some of the puzzle even if you get it right(the solution code matching btw) if will decline and treat you answer or rather code as wrong input

Other than that I love the app