For X = 1 To mWidth
''从当前列的上一列开始
StartX = X - 1
If StartX = 0 Then StartX = 1
''在当前列的下一列结束
EndX = X + 1
If EndX > mWidth Then EndX = mWidth
For Y = 1 To mHeight
''如果当前位置不是雷则开始计算
If What(X, Y) <> 10 Then
''从当前行的上一行开始
StartY = Y - 1
If StartY = 0 Then StartY = 1
''在当前行的下一行结束
EndY = Y + 1
If EndY > mHeight Then EndY = mHeight
''累加器置0
mNumber = 0
''计算四周有多少颗雷
For T = StartX To EndX
For TT = StartY To EndY
If TT = Y And T = X Then
''如果是当前位置则不计入
Else
''如果是雷则计入
If What(T, TT) = 10 Then mNumber = mNumber + 1
End If
&n