亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? winmine.cls

?? 一個用vb做的掃雷源馬
?? CLS
?? 第 1 頁 / 共 4 頁
字號:
'           inY:        Y co-ordinate of mouse cursor position                      '
'                                                                                   '
' Returns:  None                                                                    '
'                                                                                   '
'***********************************************************************************'
Public Sub EndHitTest(intButton As Integer, intX As Single, intY As Single)
    
    ' if currently processing a mouse click ...
    If mblnHitTestBegun Then
        ' reset the flag
        mblnHitTestBegun = False
    Else
        ' if not, abort. This makes sure that the code below is executed only
        ' when a mouse button is pressed.
        Exit Sub
    End If
    
    Dim blnLeftDown As Boolean
    blnLeftDown = (intButton And LEFT_BUTTON) > 0

    ' if left mouse button pressed ...
    If blnLeftDown Then
        
        ' Calculate row and col grid co-ords from the clicked mouse co-ords
        intX = Int(intX / mintButtonWidth)
        intY = Int(intY / mintButtonHeight)

        ' abort, if  co-ords lie outside minefield
        If intX >= mintCols Or intY >= mintRows Or intX < 0 Or intY < 0 Then
            Exit Sub
        End If

        ' abort, if current square, over which mouse is released has been
        ' marked with a flag
        If mbytMarked(intY, intX) >= FLAGGED Then Exit Sub

        ' Calculate the grid co-ords from last valid mouse cursor co-ords
        intX = mintCol \ mintButtonWidth
        intY = mintRow \ mintButtonHeight
    
        If mbytMarked(intY, intX) = QUESTION Then
            mfrmDisplay.imgQsPressed.Visible = False
        Else
            mfrmDisplay.imgPressed.Visible = False
        End If
        
        Select Case mbytMineStatus(intY, intX)

            Case Is >= BEEN:    ' abort, if current square has already been opened
                                Exit Sub
            
            Case NONE:  ' if current square is empty, iteratively open all
                        ' surrounding squares until non-empty squares are reached
                        OpenBlanks intX, intY
                        
            Case MINE:  ' if current square contains a mine, you blew it!
                        Dim intXm As Integer        ' X co-ord of mine location
                        Dim intYm As Integer        ' Y co-ord of mine location
                        Dim vntCoord As Variant     ' variant used in For Each loop
                        Dim i As Integer            ' Loop counter
                
                        ' reveal all the squares that contain mines
                        For i = 0 To mbytNumMines - 1
                            
                            intYm = mbytMineLocations(i, 0)
                            intXm = mbytMineLocations(i, 1)

                            If mbytMarked(intYm, intXm) < FLAGGED Then
                                mfrmDisplay.PaintPicture mfrmDisplay.imgMine, intXm * mintButtonWidth, intYm * mintButtonHeight
                            End If
                        
                        Next

                        ' display the current square as a blown mine
                        mfrmDisplay.PaintPicture mfrmDisplay.imgBlown, mintCol, mintRow
                        
                        ' reveal all the squares that were wrongly marked as mines
                        For Each vntCoord In mcolWrongLocations

                            intYm = vntCoord.mintY
                            intXm = vntCoord.mintX

                            mfrmDisplay.PaintPicture mfrmDisplay.imgWrongMine, intXm * mintButtonWidth, intYm * mintButtonHeight
                        
                        Next
                        
                        ' prepare for new game
                        mblnNewGame = True
                        
                        Dim CRLF As String
                        CRLF = Chr$(13) & Chr$(10)
                        
                        MsgBox "You Lose!", vbExclamation, "WinMine"

            Case Else:  ' if current square surrounds one or more squares that contains a mine
                        ' reveal the number of such mines that surrounds it
                        mfrmDisplay.PaintPicture mfrmDisplay.imgPressed, mintCol, mintRow
                        mfrmDisplay.CurrentX = mintCol
                        mfrmDisplay.CurrentY = mintRow
                        mfrmDisplay.ForeColor = QBColor(mbytMineStatus(intY, intX))
                        mfrmDisplay.Print mbytMineStatus(intY, intX)
                        
                        ' and mark it as being opened
                        mbytMineStatus(intY, intX) = mbytMineStatus(intY, intX) + BEEN
    
        End Select
    
    End If

End Sub
'***********************************************************************************'
'                                                                                   '
' Purpose:  Does other important stuff like calculate the size of the display form  '
'           when the form object used for display is passed to the class by         '
'           assigning it to this property procedure. Called in the form load event  '
'           of the main display form.                                               '
'                                                                                   '
' Inputs:   frmDisplay: The form object that is used as the main display form       '
' Returns:  None                                                                    '
'                                                                                   '
'***********************************************************************************'
Public Property Set frmDisplay(frmDisplay As Form)
    
    Set mfrmDisplay = frmDisplay
    mfrmDisplay.FontBold = True
    
    ' Resize the form to fit the chosen game level's minefield dimensions
    ResizeDisplay
    
End Property
'***********************************************************************************'
'                                                                                   '
' Purpose:  Displays the values for the number of rows, columns and mines from the  '
'           current game level, in the textboxes of the custom dialog box           '
'                                                                                   '
' Inputs:   frmDialog:  The modal form object that is used as the custom dialog box '
' Returns:  None                                                                    '
'                                                                                   '
'***********************************************************************************'
Public Sub GetMineFieldDimensions(frmDialog As Form)

    frmDialog.txtRows = mintRows
    frmDialog.txtColumns = mintCols
    frmDialog.txtMines = mbytNumMines
    
    frmDialog.txtRows.SelLength = Len(frmDialog.txtRows)
    frmDialog.txtColumns.SelLength = Len(frmDialog.txtColumns)
    frmDialog.txtMines.SelLength = Len(frmDialog.txtMines)

End Sub
'***********************************************************************************'
'                                                                                   '
' Purpose:  Allocates memory for dynamic arrays according to current minefield      '
'           dimensions and sets up the mine locations in the minefield              '
'                                                                                   '
' Inputs:   None                                                                    '
' Returns:  None                                                                    '
'                                                                                   '
'***********************************************************************************'
Private Sub InitializeMineField()
    
    ' allocate space for the 2D dynamic arrays to fit the current
    ' minefield size
    ReDim mbytMineStatus(mintRows - 1, mintCols - 1)
    ReDim mbytMarked(mintRows - 1, mintCols - 1)
    ReDim mbytMineLocations(mbytNumMines - 1, 1)

    ' Generate random mine locations in the minefield and store them in
    ' the mbytMineLocations array. Also fill the mbytMineStatus array with
    ' info as to which squares contain mines and which are the ones that
    ' indicate surrounding mines
    Randomize

    Dim i As Integer    ' Loop counter
    Dim r As Integer    ' Loop counter
    Dim c As Integer    ' Loop counter

    For i = 0 To mbytNumMines - 1

        Dim intX As Integer
        Dim intY As Integer

        intX = Int(Rnd * mintCols)
        intY = Int(Rnd * mintRows)

        While mbytMineStatus(intY, intX) = MINE
            intX = Int(Rnd * mintCols)
            intY = Int(Rnd * mintRows)
        Wend

        mbytMineStatus(intY, intX) = MINE
        mbytMineLocations(i, 0) = intY
        mbytMineLocations(i, 1) = intX

        For r = -1 To 1
            For c = -1 To 1

                Dim blnDx As Boolean
                Dim blnDy As Boolean

                blnDy = intY + r >= 0 And intY + r < mintRows
                blnDx = intX + c >= 0 And intX + c < mintCols

                If blnDy And blnDx Then
                    If mbytMineStatus(intY + r, intX + c) <> MINE Then
                        mbytMineStatus(intY + r, intX + c) = mbytMineStatus(intY + r, intX + c) + 1
                    End If
                End If

            Next
        Next

    Next

End Sub
'***********************************************************************************'
'                                                                                   '
' Purpose:  Prepares for a new game                                                 '
' Inputs:   None                                                                    '
' Returns:  None                                                                    '
'                                                                                   '
'***********************************************************************************'
Public Sub NewGame()
    
    ' clear the current display in the main form
    mfrmDisplay.Cls
 
    ' reset game variables and flags
    mbytCorrectHits = 0
    mbytTotalHits = 0

    mintRow = -1
    mintCol = -1

    mblnNewGame = False
    mblnHitTestBegun = False
    
    Dim i As Integer            ' Loop counter

    ' empty the collection of wrong co-ords
    For i = 1 To mcolWrongLocations.Count
        mcolWrongLocations.Remove 1
    Next
    
    ' re-calculate new mine locations
    InitializeMineField
    
    ' Reset the display of number of mines left
    mfrmDisplay.lblMinesLeft = "Mines Left : " & mbytNumMines
    
End Sub
'***************************************************************************************'
'                                                                                       '
' Purpose:  If the square that was clicked was empty, then this function iteratively    '
'           opens all squares surrounding it, until non-empty squares are encountered   '
'           A general fill algorithm is adopted here, wherein, the current square       '
'           location keeps moving left, until it comes across a non-empty square. From  '
'           here onwards, it tries to trace out a border of non-empty squares by moving '
'           clockwise in the directions where it can go. At the same time it stores the '
'           pairs of starting and ending X co-ords on each scanline that crosses the    '
'           region enclosed by the traced out border.                                   '
'                                                                                       '
' Inputs:   inX:    X grid co-ordinate of the square where the mouse was clicked        '
'           inY:    Y grid co-ordinate of the square where the mouse was clicked        '
'                                                                                       '
' Returns:  None                                                                        '
'                                                                                       '
'***********************************************************************************'***'
Private Sub OpenBlanks(ByVal intX As Single, ByVal intY As Single)

    ' flags to keep track of the direction in which current square moves
    Dim blnGoUp As Boolean
    Dim blnGoRight As Boolean
    Dim blnGoDown As Boolean

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色偷偷久久一区二区三区| 精品一区二区三区免费毛片爱| 精品福利在线导航| 91精品国产综合久久久蜜臀图片| 色天天综合色天天久久| 97久久人人超碰| 99国产精品国产精品毛片| 91亚洲男人天堂| 色综合一区二区| 欧美视频在线观看一区| 91黄色小视频| 777亚洲妇女| 日韩精品专区在线影院重磅| 精品对白一区国产伦| 欧美变态tickle挠乳网站| 精品福利av导航| 亚洲国产成人一区二区三区| 国产精品热久久久久夜色精品三区 | 亚洲乱码日产精品bd| 日韩毛片在线免费观看| 亚洲一区视频在线| 狂野欧美性猛交blacked| 国产麻豆午夜三级精品| 粉嫩欧美一区二区三区高清影视| 成人综合婷婷国产精品久久| 不卡的av网站| 欧美另类高清zo欧美| 久久美女艺术照精彩视频福利播放| 国产亚洲一区二区在线观看| 国产精品久久久久9999吃药| 一区二区国产视频| 激情综合亚洲精品| 99国产精品久| 日韩美一区二区三区| 亚洲欧洲日本在线| 日产精品久久久久久久性色| 国产福利精品一区| 色八戒一区二区三区| 精品国产电影一区二区| 亚洲综合另类小说| 精品一区二区三区在线播放| 在线视频综合导航| 久久蜜臀中文字幕| 亚洲午夜在线视频| 成人性生交大片免费看视频在线 | 欧美三电影在线| 久久久精品国产免费观看同学| 亚洲一区在线看| 成人精品在线视频观看| 日韩欧美国产一二三区| 国产精品丝袜91| 国模无码大尺度一区二区三区| 在线亚洲高清视频| 亚洲三级在线观看| 国产福利视频一区二区三区| 日韩欧美国产不卡| 午夜国产精品一区| 91视频观看视频| 欧美极品xxx| 国产凹凸在线观看一区二区| 91精品国产色综合久久不卡电影 | 久久综合九色综合97婷婷| 一区二区三区欧美| 99re热这里只有精品免费视频| 久久久91精品国产一区二区精品| 亚洲一区二区三区视频在线 | 欧美性高清videossexo| 中文字幕一区在线观看视频| 国模大尺度一区二区三区| 91麻豆精品国产综合久久久久久| 亚洲老妇xxxxxx| 91日韩精品一区| 亚洲欧洲综合另类| 日本韩国欧美三级| 亚洲欧洲日本在线| 91蝌蚪porny九色| 亚洲欧美国产三级| 在线观看av一区二区| 夜夜嗨av一区二区三区中文字幕| 99re6这里只有精品视频在线观看| 国产精品美女久久久久久2018| 成人综合在线网站| 国产精品不卡视频| 色天使色偷偷av一区二区| 日韩美女视频一区二区| 91丨九色丨国产丨porny| 亚洲精品精品亚洲| 欧美午夜在线一二页| 丝袜亚洲精品中文字幕一区| 3751色影院一区二区三区| 久久精品久久精品| 国产人伦精品一区二区| 成人免费视频一区| 亚洲精品视频一区二区| 欧美性感一区二区三区| 蜜桃免费网站一区二区三区| 久久五月婷婷丁香社区| www.性欧美| 国模少妇一区二区三区| 欧美激情一区二区三区蜜桃视频 | 国产在线精品国自产拍免费| 国产丝袜在线精品| 91麻豆国产福利精品| 亚洲制服丝袜在线| 精品国产区一区| 97久久人人超碰| 日韩二区在线观看| 国产日产亚洲精品系列| 欧美在线免费播放| 国产一区二区美女| 成人免费在线播放视频| 宅男噜噜噜66一区二区66| 国产suv精品一区二区6| 亚洲chinese男男1069| 久久精品夜色噜噜亚洲a∨| 在线观看不卡视频| 国产精品自在欧美一区| 亚洲国产日韩a在线播放 | 国产成人8x视频一区二区| 国产精品国产a| 日韩精品一区二区三区蜜臀| 91免费视频观看| 韩国av一区二区三区在线观看| 亚洲三级小视频| 久久婷婷国产综合国色天香| 欧美日韩精品一区二区三区 | 丁香激情综合五月| 日本不卡不码高清免费观看| 日韩理论在线观看| 久久嫩草精品久久久精品一| 4438亚洲最大| 欧美男男青年gay1069videost | 欧美日韩精品欧美日韩精品| av不卡一区二区三区| 国产乱妇无码大片在线观看| 日本不卡视频在线| 偷拍亚洲欧洲综合| 亚洲毛片av在线| 国产精品久久夜| 国产三级一区二区| 国产亚洲精品aa| 欧美精品一区二区三区高清aⅴ| 欧美日韩夫妻久久| 在线观看不卡一区| 91久久久免费一区二区| 97精品久久久午夜一区二区三区 | 亚洲欧美日韩中文字幕一区二区三区 | 亚洲男人天堂av| 国产精品乱人伦| 欧美国产97人人爽人人喊| 久久综合色婷婷| 久久蜜桃av一区精品变态类天堂| 91精品国产综合久久小美女| 在线综合亚洲欧美在线视频| 9191成人精品久久| 日韩午夜精品视频| 日韩欧美一级特黄在线播放| 538prom精品视频线放| 欧美日本在线视频| 在线成人av影院| 欧美成人午夜电影| 精品国产乱码久久久久久图片 | 亚洲黄色小视频| 亚洲综合在线电影| 婷婷丁香久久五月婷婷| 亚洲成人精品一区二区| 日韩精品久久久久久| 久久99久久久久| 国产一区在线视频| 欧美系列亚洲系列| 日韩一区二区影院| 久久精品欧美一区二区三区不卡| 久久麻豆一区二区| 亚洲精品视频免费看| 亚洲成人av中文| 激情五月激情综合网| 国产成人精品免费看| 色婷婷亚洲精品| 欧美一区二区三区免费在线看| 337p粉嫩大胆噜噜噜噜噜91av| 精品播放一区二区| 自拍偷拍亚洲欧美日韩| 亚洲成人www| 东方aⅴ免费观看久久av| 在线免费av一区| 欧美成人r级一区二区三区| 中文天堂在线一区| 三级精品在线观看| 成人ar影院免费观看视频| 欧美美女黄视频| 国产精品国产三级国产普通话蜜臀 | 亚洲欧洲日韩av| 日韩av午夜在线观看| 国产盗摄视频一区二区三区| 欧美日产在线观看| 国产欧美精品一区二区色综合朱莉| 亚洲夂夂婷婷色拍ww47| 国产福利91精品| 日韩视频在线一区二区| 亚洲精品免费电影|