Back to General discussions forum
Hello everyone,
I tackled the Hurkle task and I ended up with a version that one can play, but the checker says
Non-zero exit code! either you've broken something, or tell admin: -1
What could be the problem? I'm thankful for every guess. :)
Your logic isn't quite working.
Print out HX
and HY
in your code and check the messages.
I tried it, the hurkle was at 3/5, I guessed 5/5 and got the reply 'go east'.
Thank you, I will look into it. ^^
I've also been seeing a different strange error with this problem. Repeatedly submitting the same code, I sometimes get a "Correct" result, and sometimes get the error Program not ended properly... perhaps you halted it?
. I assume that the code must be tested against random testcases and there must be some edge case that my code can't handle that sometimes gets included in those testcases.
But looking at my code I'm really not sure what could possibly be causing this edge case error... Does somebody want to take a look at my code to double-check and make sure that it's not actually a checker-side issue? I realize my solution may be a little more 'geometric' than necessary, but it seems like the error is coming from a 'code structure' issue.
https://www.codeabbey.com/index/task_solution?task=hurkle&user=moxieman&lang=Lua
For starters: does your code really allow 5 attempts?
Ah, I see. When I decreased my initial attempt counter by 1 I was getting "too many attempts" errors, but I see in retrospect that I drew the incorrect conclusion from that observation. Increasing that initial counter value by 1 was not solving the root issue.
I feel quite silly now, I must admit...