This pull request is a refactor for making the life easier for future implementations. Although this includes a new folder to enable graphics. Is just optional. Everything works the same. Type make and ./clue and play the terminal version. Like before.
Before approving this, please review all the code in the files changed tab and comment the code lines if necessary.
Main Changes
Now the logic from the adventure.c was moved to a new file called game.c
Removed all the debug mess in favor of tests.c
I created a lot of tests for the game logic: make test && ./test
The graphics is introduced but incomplete and it's inside a separate folder. To compile type: make graphics and ./clue
This pull request is a refactor for making the life easier for future implementations. Although this includes a new folder to enable graphics. Is just optional. Everything works the same. Type
make
and./clue
and play the terminal version. Like before.Before approving this, please review all the code in the files changed tab and comment the code lines if necessary.
Main Changes
adventure.c
was moved to a new file called game.cmake test && ./test
make graphics
and./clue
The new game state
https://github.com/jinc0930/Clue/blob/a974e9e9220f92b26cae83eddd3bbe2fb58514f4/game.h#L13-L26
A single test case for demo
https://github.com/jinc0930/Clue/blob/a974e9e9220f92b26cae83eddd3bbe2fb58514f4/tests/test.c#L90-L97
Make commands
make test && ./test
make && ./clue
make graphics && ./clue
Graphical progress is being tracked here