Game Development Reference
The board after a number of book moves.
'First move must be unmarked.
If FirstSq.Text <> "" Then Return 0
'The follow-up move must be unmarked.
If SecondSq.Text <> "" Then Return 0
'First square needs eight unclicked neighbors.
Dim Sq As Square
For Each Sq In theField.NearNeighbors(FirstSq.R, FirstSq.C)
If Sq.IsRevealed() Then Return 0
'First move looks good, try it.
theField.MoreThoughts("Book First Move attempting R" & _
FirstSq.R.ToString & " C" & FirstSq.C.ToString)
'We took one move.
The whole point of this routine is to take a first move and second move pair and
check that this is a good place to take both moves. If the first move has been
taken, the square would be revealed already, and we obviously cannot take the