The game's GUI proper is a frame.
The frame is created and shown either when the program is executed
as an application or when the mouse is clicked on the applet.
Architecture.
The program creates and starts a "control" thread for the
alternation of moves between players.
The control thread executes an infinite loop
where most of the time it waits.
The control thread is notified when a move or a move-like operation
is completed.
A move is completed either when the machine computes a position
or when the user selects a position that can be occupied
according to the game's rules.
A move-like operations is blinking a position,
backtracking or suggesting moves, etc.
The code awakening the control thread sets a state.
When the control thread is notified, it performs an iteration
through the loop whose instructions depend on the state
and then it waits again.
Move Computation.
Machine moves are computed using classic principles of
artificial intelligence.
The program computes a partial game tree.
The nominal depth of the partial game tree
is determined by the level selected with the menu.
The nominal depth is by-passed for live configurations.
A configuration is live if a ply in that configuration could lead to a win.
The partial game tree is traversed by an alphabeta algorithm
in version negamax.
The static evaluation function is based on the open-line strategy.
Open lines are weigthed according to the number
of chips a player has in the line.
Moves a tried according to a plausibility ordering.
Moves in open lines with a larger number of chips of a player are tried first.
Forward pruning, which is executed only for some levels,
disregards moves with low plausibility.