Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Eulero314,validated by @Dr_Meyss,@McKael and @FredericLocquet.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @Eulero314,validated by @Dr_Meyss,@McKael and @FredericLocquet.
If you have any issues, feel free to ping them.
Some notes:
In general I feel a bit let down by the tests. The puzzle is great fun but I wished there were more of them, especially for the loop part. I know it’s a lot of work so please take my opinion with a grain of salt.
At any rate, I hope you can also do a third part, it was really nice.
test added!
I added this test also RP 2 [RP 2 [fd 5 rt 90 setpc +] ; RP 2 [fd 5 rt 90 setpc *]]
Let me know if I get your point please
I added another test, please see if consistent. If you have a test to suggest, go ahead. I have a problem with the output length, so I ran out of imagination
part 3 is out, please comment
There seem to be some issues with the new cases not consistent with the specification. I’ll leave a comment in the contribution view.
Fixed, thanks!
Glad to see new tests added to it. Surprisingly my solution still passes everything, I guess I underestimated (and probably not fully understood) my loop parsing logic.
But it wasn’t in vain, I’ve tested the 5 solutions currently shared in python and only 2 (including mine) do pass all tests. Funnily enough a couple of them bug at the Hello test, so it wasn’t a small detail after all.
Yet if you really wanted to break my code that wouldn’t be hard. Since I parse the loops by matching “[” and “]” line by line, you would just need to add a loop that spans through multiple lines. Something like:
2
RP 8 [fd 1;
rt 45]
In that case, as far as I can see, only CarlWalsh solution would pass the test.
The statement in Part 2 isn’t clear on the point that loop instructions can span through multiple lines, and it’s better not to update the puzzle any more… So I guess the test case you have suggested can appear in Part 3 instead. It’s also better to include the specification in the statement in Part 3. You may leave a comment there!
ok, I’ll add to part 3
I like the new test cases. My error was so simple. None of the original test cases ever had a ‘;’ directly after exiting a loop with more commands afterward.
I write comment on the Part1. But I see you fix the description on the setpc, but you command about the ; [ ] that can not be used, maybe need to be add to the CS. And the other thing is SETPC can I use the space in the input if I write a thing like that SETPC Hello My Friend; In the end my parser read the first space and after read until the end of the instruction. But you maybe need doing a better definition of this stuff. Anyway after doing the part 1, I have done this part in less of 30 minutes maybe. That go really fast, if you do the part 1 before.