My problem is why the my tictac toe board can´t looks like the original file.
The input file is:
X O . . . . . X .
This is the same thing as
X O .
. . .
. X .
Note that the . needs to be displayed as a space.
> Enter source filename: /home/cs124/assignments/assign40a.txt
> X | O |
> ---+---+---
>| |
> ---+---+---
> | X |
> Enter destination filename: /tmp/6b2b9755544c.txt
> File written
but when I retested this tic tac toe with the temporal I can see these results.
> Enter source filename: /tmp/6b2b9755544c.txt
> X | O | X \n
Exp: X | O | \n
> ---+---+---
> \0
Exp: | | \n
> | \0
Exp: ---+---+---\n
> | ▒ \n
Exp: | X | \n
> ---+---+---\n
Exp: Enter destination filename:
/tmp/6b2b9755544c.txt
> \0
Exp: File written\n
> | \0
Exp: No output
My code run when it is an unique test but when I try to use it again I see those results...really I feel tired to try with differents ways ,to resolve the output in the second test,If you can help me really I will apreciate it...
Notice that we are saving the file to a temporary location and then
reading it again. This means that if the below test fails, it is because
the file writing code if your program has a bug in it. Basically, the
written file should look the same as the original file.
that machine don't have heart!!!
I 'm working for this assignment 6 hours in this day.
Thank you for your idea,I have tried but that is the same results,I can pass the other test but just this test ,I have the big trouble.