Game Development Reference
In-Depth Information
Figure 4.6
Can you spot the three safe moves?
mines to place, leaving three safe blank squares to account for. The original
square hears from the helper that all three of the original square's safe squares
are among the four shared squares. This means that there are no safe private
blank squares around the original square, so those private blank squares are all
mines (see Figure 4.7). This is a powerful rule, and together with the single
square rule it plays very effectively. Turning the rule into code will be somewhat
A Two-Square Evaluation Rule Using Near Neighbors
Add a class to the project, name it RuleTwoNear.vb, and make it inherit from
BasicRule .
Inherits BasicRule
VB will provide the skeleton for the Matches function. Add code to the Matches
function so that it resembles the following:
Public Overrides Function Matches(ByVal RevealedSquare As Square) As Integer
'We use a helper function with near neighbors
Search Nedrilad ::

Custom Search