summary refs log tree commit diff stats
path: root/util.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Formatted source codeStar Rauchenberger2023-11-021-49/+40
|
* Redesigned the solver algorithmKelly Rauchenberger2018-07-131-9/+9
| | | | | | | | The new solver algorithm decreases the size of the search space by combining states. A flood fill is used to find all of the positions accessible by the player without changing the board state, and that flood is considered a node in the search graph, rather than there being a node for every position on every board state. Other optimizations are implemented too, like checking for changes locally instead of using tick, and using unordered_map/unordered_set because bitsets are hashable. Also changed wrap to use references, finally. refs #1
* Whitespace changesKelly Rauchenberger2018-07-121-4/+4
|
* Ensured that generated levels are possibleKelly Rauchenberger2016-02-211-3/+5
| | | | | | I wrote a pathfinding algorithm that will attempt to solve boards as they are generated. I tried a variety of algorithms, most of which either did not terminate in a timely fashion. Depth-first search, with a tendancy towards moving towards the center, proved to be the best algorithm, and managed to solve boards the other algorithms timed out on. Because the algorithm was mostly tested on levels 0-9, and level diversity increases dramatically past that point (to the point where, past level 50, I am concerned that actual impossible boards may appear), I cannot be completely sure that the algorithm will perform as desired. To help debug, the program will dump a string representing a board state if an impossible board is generated. Also fixed a bug in wrap().
* Started rewriting game from scratch with SDL2Starla Insigna2013-08-271-0/+69
Only the title screen is currently implemented