0

I am working on the game of fifteen on problem set 3. The code runs fine but fails check50. the error message is as follows:

:) fifteen.c exists

:) fifteen.c compiles

:) init initializes 3x3 board correctly

:) init initializes 4x4 board correctly

:) 3x3 board, move blank up twice

:) 3x3 board, move blank left twice

:) 3x3 board, move blank left then right

:) 3x3 board, move blank up then down

:) 3x3 board, move up-up-left-down-down-left-up-up-right-down-down-right

:( 3x3 board, from start try to move tile 2, 4, 5, 6, 7, 8 \ expected "6" character 5 of line 17, not "0":( 3x3 board, move blank left (tile 1) then up (tile 4), then try to move tiles 1, 2, 6, 8 \ expected "1" character 5 of line 15, not "0":) 3x3 board, move blank up (tile 3), then try tile 2

:) 3x3.txt wins the 3x3 board

:) 4x4.txt wins the 4x4 board

I cant understand why the error message appears!

0

Try generating a 3x3 board and make the same moves check50 did, you should be able to spot the error.
If this answers your question please mark as answered.

| improve this answer | |
  • Did a step by step run. There was an error in one of my condition in move function. Thank you :) – Ankush Aug 31 '16 at 9:31

You must log in to answer this question.

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