GridOS 1 quest 2, basic

A quest 2, part 1 solution might look like this:

There’s a rule saying, that when a characters appears 2 times in a row, it produces an @. So with 2 heads, I can look at 2 characters at the same time, and I have rules for each of the cases: AA, AB, BA and BB.

For part 2, there can be several lines. I go right on the 1st line, left on the 2nd etc.

For part 3, pairs can occur both horizontally and vertically. I solve this by using 2×2 heads + 1 extra head for writing @. This is because when there are pairs in both directions, I need to write 2 @’s. 1 @ will replace the character appearing in both pairs, the other @ will just be written above the 1st line.

All my code .

Skriv en kommentar