Skip to content

ahjmorton/keep_talking_and_nobody_explodes_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keep Talking and Nobody Explodes solvers

This repo contains a series of solvers for the amazing Keep Talking And Nobody Explodes game written in C.

Should I use it while playing the game?

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.

Does this really solve every module?

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.

How do I use solver X?

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.

Technical stuff

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

Project layout

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.

Why C?

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.

About

"Just for fun" solvers for the fun bomb defusal game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published