0

Can anyone help me out on this :-

pset3 GAME OF FIFTEEN

My game is working fine but check50 is showing errors.

check50 2015.fall.pset3.fifteen fifteen.c

:) fifteen.c exists

:) fifteen.c compiles

:( init initializes 3x3 board correctly
   \ expected file to be of length 18, not 26

:( init initializes 4x4 board correctly
   \ expected file to be of length 38, not 48

:| 3x3 board, move blank up twice
   \ can't check until a frown turns upside down

:| 3x3 board, move blank left twice
   \ can't check until a frown turns upside down

:| 3x3 board, move blank left then right
   \ can't check until a frown turns upside down

:| 3x3 board, move blank up then down
   \ can't check until a frown turns upside down

:| 3x3 board, move up-up-left-down-down-left-up-up-right-down-down-right
   \ can't check until a frown turns upside down
:| 3x3 board, from start try to move tile 2, 4, 5, 6, 7, 8
   \ can't check until a frown turns upside down

:| 3x3 board, move blank left (tile 1) then up (tile 4), then try to move tiles 1, 2, 6, 8
   \ can't check until a frown turns upside down

:| 3x3 board, move blank up (tile 3), then try tile 2
   \ can't check until a frown turns upside down

:| 3x3.txt wins the 3x3 board
   \ can't check until a frown turns upside down

:| 4x4.txt wins the 4x4 board
   \ can't check until a frown turns upside down

my code is here http://pastebin.com/7C13CEhX

1

Looking at your code, it seems that you are using the 2013 version of fifteen.c rather than the current version. That old version creates the log differently, so check50 is failing (as it expects the newer version of the log file which has a different format).

Please download the current version http://cdn.cs50.net/2015/fall/psets/3/pset3/pset3/fifteen/fifteen.c

2
  • I am getting the same error but i am using the 2015 version. What could be wrong?
    – Kshitij
    Jun 12 '16 at 21:31
  • @Kshitij make sure you are setting your blank tile value to 0 as the spec says.
    – curiouskiwi
    Jun 13 '16 at 1:54

You must log in to answer this question.

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