[Community Puzzle] Merlin's Magic Square

Thanks for playing my puzzle. :grin:

Honestly it’s not really clear what you’re saying… Especially this part “tries it as if lizzo pressed all the buttons she did + 1 to 4. ”

What do you mean by “buttons plus 1 to 4”

can you try saying it a different way?

At the top, he does note that this is pseudo code.

Sorry, english isn´t my first language, I´ll try to make it more clear:
Imagining Lizzo presses the buttons 8, 4, 4,
When I test in the for-loop by going from one to nine, it doesn´t “reset” to the state where Lizzo ended. So by testing for five, the state of the Square as if the numbers 8, 4, 4, 1, 2, 3, 4 where pressed before (it should obviously be 8, 4, 4).

1 Like

Hi Silas… —

Two thoughts on that:
~Why are you testing MORE THAN 1 button (1 and 2 and 3 and 4). The puzzle states that you only need to press ONE more button to solve it
~Ask yourself “How can I get the puzzle back to the state it was at before I pressed this last button?” And then do that each time. If you are not sure, you can play Merlin’s Magic Square in the simulator I made (Link to that is toward the bottom of the puzzle description.)

Does that help?

Your 5 should be:

1 1 1
1 1 1
0 0 0

Which after pressing 8 it would give:

1 1 1
1 1 1
1 1 1

edit: Ignore me. I’m just dumb.

Hi,

You have an error in your code, in Test 3 the example you’re using, here’s the proper state of the board:

Start
~ ~ *
~ ~ *
* * *

Pressing 2
* * ~
~ ~ *
* * *

Pressing 4
~ * ~
* ~ *
~ * *

Pressing 6
~ * *
* ~ ~
~ * ~

Pressing 1
* ~ *
~ * ~
~ * ~

Pressing 8
* ~ *
~ * ~
* ~ *
1 Like

Oh. Actually. You’re right. For some reason, even after playing the game, I had it stuck in my head that the corners only lit up the two buttons next to them, not also the center. That is my error.

My solution passes all the tests in the IDE, and all the validators but Validator 4. Is there something special about that one, that differs from the others and from Test 4?

Interesting. It seems there was (maybe) an extra blank-space at the very end of the input in Validator 4, that didnt need to be there.
I have now removed it. :slight_smile:
Let me know if it’s still a problem.

It works now. Thank you for your quick response!

1 Like

• When you press a side button (2, 4, 6 or 8), it reverses the 3 buttons in that border row

This is not quite the correct description since only 2 and 8 change elements in a row, while 4 and 6 change elements in a column.