This is a program to visualize the graph problem from the 1998 Tokyo University entrance exam.
Problem description (Japanese): https://examist.jp/legendexam/1998-tokyo/
- cmake
- make
- libsdl2
- libcairo
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./todai_graph
You can change various parameters in include/constants.h
.
- left click: select a node / edge. Deselect (if clicking anywhere else).
- shift + left click: add a node (according to the rules of the problem).
- right click (and dragging): move selected node.
- u: undo last action.
- b: make the selected node black.
- w: make the selected node white.
- r: reset
- everything is statically allocated, so everything has hardcoded limits.
I consider the program (almost) feature complete. Further improvments planned are:
new feature: reset keyrefactor rendering, gamestate- new control scheme
- (using dynamic data structures)