Implement automatic pass (when there is no legal move) and end-of-game Along with a simple report of the score and the winning player. This is obviously much better than the hidden UI of requiring a right-click to pass (and the bogus option of allowing a pass when a player has a legal move).
Add a new dvonn_board_cell_owned_by function The compiler was warning that we were comparing enums of two different types. That's true—we are, but that's because the values for dvonn_cell_t are declared by reference to dvonn_player_t values. Anyway, rather than cluttering up the code with lots of casts to silence this warning, here we add a new function that takes care of that cast, leading to more readable code.
Eliminate stacks disconnected from red DVONN pieces At this point, the game is actually playable for the first time. There's still very little actual UI here, (no indication of who the current player is, no buttons for passing, starting a new game, etc.). But with two people who know how to right-click and have out-of-band communication to say when its the opponent's turn, it's possible to play now.
Enforce legal moves All the checks for legal moves are now enforced, (including not even selecting a piece if it is surrounded). Basically all that's missing now is elimination of disconnected pieces, (and the ability to pass when there is no available move).
Add visual indication for non-red stacks containing a red piece Also, don't bother displaying the stack-height number until the stack has at least two pieces in it. The game is really close to being possible to play manually, (without the computer enforcing the rules), except that it's not yet possible to eliminate the disconnected pieces.
Implement placement phase of game It's getting *close* to playable now. We still need visual indications for the following: stack height, red piece in stack, selected stack, and most recently moved stack. We also need logic for legal moves as well as for removing disconnected pieces after a move. But that's not really that much code.
Add simplistic button-press handling Right now this is just toggling a white ring on and off at each location. The significant bit here is that the calculations between board-index positions and screen coordinates are now correct. Thanks to Keith Packard for helping me think through some of the math here.