Game Development Reference
In-Depth Information
Figure 4.7
The AI places three mines using the second rule.
'We should be part of a playing field
Dim theField As PlayingField = RevealedSquare.Parent
'Who is around me that might help?
Dim CloseNeighbors As Collection = theField.NearNeighbors( _
RevealedSquare.R, RevealedSquare.C)
'Do the work
Call AI.TwoSquareMatcher(RevealedSquare, CloseNeighbors, _
SimonSays, SquaresList)
'How many moves were found?
If SquaresList.Count > 0 Then
'Tell the world what we think
If SimonSays = PossibleActions.BlanksToFlags Then
theField.MoreThoughts(Me.GetType.Name & " sees " & _
SquaresList.Count.ToString & " mines to flag.")
Search Nedrilad ::




Custom Search