This repo contains a series of solvers for the amazing Keep Talking And Nobody Explodes game written in C.
No, go grab a friend. print out the manual and play it first. Even if you have trouble I wouldn't recommend using these solvers.
If you believe you can create a solver for a module not already handled here then consider raising a PR.
At present the repo has solvers for the following modules:
In terms of solvers for other modules it comes down to when the original author can be bothered to create them (PRs welcome) and how feasible they are to actually solve.
TODO WRITE DOCS
At this point the code is the documentation unfortunately. Given this code was written for fun / exploration the documentation might never come.
Potentially try reading through the implementation of the command line and figure out what arguments mean what.
At present the only dependencies required to build the solvers are CMake and a working C99 compiler (other compilers are available).
Which means from the root of the directory we can:
cd build
cmake ../
make
For tests we also require that GTest is available.
Assuming that is installed we can run the (incomplete, PRs welcome) test suite with:
cd build
make test
The layout of the project is
|
|- cli // Executable commands for the various solvers.
! // Tend to include an implementation from lib that
| // implements an interface from include.
| // Primarily there for arg parsing and output.
|- include // Header files for the various solvers.
|- lib // Implementations of the solvers along with any utlity code.
|- test // Some but not all the solvers have tests written.
The most flippant answer I can give is that it would be boring to do this in a higher level programming language.
The other reason is that I was using this library to test out of concepts from data orientated design, mechanical sympathy and ultimately how to best leverage the cache. With C we have a higher degree of control about how the program is laid out in memory at runtime. Not every solver truly explores these concepts, with the only real notable example being the maze solver where the maze data structures are supposedly designed for cache efficiency. How successful I've been in making that the case is left as a later exercise for myself / one for the reader.