1

I am working on the game of fifteen on pset3. The code runs fine on my computer but fails check50. I have stepped through it in gdb and can not find what check50 is talking about. The two tests it is failing is '3x3.txt wins the board' and '4x4.txt wins the board'. This is what I don't understand it passes both when I run it. Check50 says '\expected an exit code of 0, not a prompt for input' on both tests. But I don't see any prompt for input when it wins the game. I have stepped through it with gdb and after it calls win it breaks out of the loop, closes the log file and returns. There is no prompt for input. And another thing when I run check50 and it fails I click on the link to go to the web page and the last two tests that it fails are not on the page. Only the ones it passes every other pset I have done the page has both the passes and fails. The links are below Thanks you for your help. enter link description here enter link description here

1
  • Please add your edit as an actual answer and accept it so that it is removed from the unanswered question pool. thanks.
    – Cliff B
    Feb 8 '16 at 6:29
0

I changed the last if statement in the move function to else if and now it passes the 3x3.txt test and on the first for loop in won function I went from (dimension - 1) to 1 instead of 0. So I solved it.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .