Hiyas! So I'm fairly confident that I've implemented a functional version of The Game of Fifteen, but the check50 sequence returns some odd errors:

~/workspace/pset3/fifteen/ $ 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 19
:( init initializes 4x4 board correctly
   \ expected file to be of length 38, not 39

Where are these extra bytes coming from? Any ideas? Does it have to do with the value I assigned to the blank tile (82)? Did I make adjustments to the log file output that I shouldn'a?

1 Answer 1


From the spec:

Note that check50 assumes that your board’s blank space is implemented in board as 0; if you’ve chosen some other value, best to change to 0 for check50's sake.

  • Dino is absolutely right. You chose a 2 digit number. That puts an extra digit in the log file that check50 looks at. Did you notice that the check50 results are saying there's an extra digit in the log file?
    – Cliff B
    Dec 27, 2016 at 21:01
  • Thanks eh. Zamyla's video instructs the coder to choose whatever value they want for the blank tile, but further on in the spec it does indeed instruct the use of "0" for that value. Lovely bit of contradiction there. Dec 27, 2016 at 21:36

You must log in to answer this question.

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