i seem to have some trouble passing
test check_quantum_qcorrect. Its my only failing test. Afaik, im supposed to mark a word as
QUANTUMCORRECT as long as the guess has a char in the correct place in one of the two words, but if there are matching characters in both words. If my guess is only matching chars in one of the two words, im supposed to mark it as
CORRECT, right? I debugged it and it seemed to work fine, i cant make out the reason for the test to fail.
i have a little trouble understanding your question correctly. Words are marked with regular feedback as long as there are no letter occurances from both secret words. If it is the case that there are letter occurances from both words, you change all feedback into Quantumfeedback.
Hope this helps,
Hi Niklas, thanks, thats basically what i did. Still, the test seems to fail. Weird…
In that case I can only recommend thinking about possible edgecases and then writing your own unit tests. Try to go through your logic step by step either by hand or assisted by the debugger and try to see where your logic might not be fully correct.
Maybe visit the office hour if you can’t find any mistake in your logic.
To add to this:
The issue does not necessarily has to be in the logic.
It might be the case that other issues like ASAN errors or other memory problem become apparent in this specific test case.
Thanks guys, im not quite sure what fixed it in the end, but it most certainly was some logic error. I’m passing it now