Choosing Directions in a Maze Generator
Separating legal moves from random choice with a direction mask, a repeat policy, and explicit backtracking state.
Browse the archive
Separating legal moves from random choice with a direction mask, a repeat policy, and explicit backtracking state.
A while loop, an increment-driven for loop and recursion express the same search operations through different control flow.
Normally a tile map displays spaces which can be defined in finite terms using a piece of paper. A hypermaze, however, can be defined using a piece of paper, only, if you use a graph to describe how the pieces fit together. This is true for…
There you are designing a parallel algorithm, and then it occurs to you: How do I return information to the main thread from a child thread? If you've skimmed through half of The C++ Programming Language (4th Edition) by Bjarne Stroustrup like I have, you may…
The problem is this: You have a two dimensional grid, and you need to scan the entire thing. Sure, but what does this ambiguous "scan" do? Well this particular post is about a word search puzzle, so the scans need to create strings to be used…