【正文】
39。非點選的方塊坐標(biāo)時 If mapArr(rX, rY) 9 And _ Not (rX = xxx And rY = yyy) Then cMINE_NUM = cMINE_NUM 1 mapArr(rX, rY) = 9 39。地雷外圍數(shù)字各加一 For xx = rX 1 To rX + 1 For yy = rY 1 To rY + 1 If xx = 0 And xx = MAP_X And _ yy = 0 And yy = MAP_Y Then If mapArr(xx, yy) 9 And _ Not (xx = rX And yy = rY) Then mapArr(xx, yy) = mapArr(xx, yy) + 1 End If End If Next yy Next xx End If Loop End If鼠標(biāo)事件:組件名稱_MouseDown(index As Integer, _Button As Integer, _Shift As Integer, _ x As Single, _y As Single)組件名稱_MouseUp(index As Integer, _Button As Integer, _Shift As Integer, _ x As Single, _y As Single)表示翻開方塊:If Button = 1 Then 39。鼠標(biāo)左鍵 If mapFaceArr(xxx, yyy) = 1 Then Call setMineImage(index, 10) Set = (3).Picture End IfIf Button = 2 Then 39。鼠標(biāo)右鍵 If mapFaceArr(xxx, yyy) = 1 Then 39。未探測 mapFaceArr(xxx, yyy) = 2 MINE_NUM_LABEL = MINE_NUM_LABEL + 1 Call setMineImage(index, 13) Call setNowMines ElseIf mapFaceArr(xxx, yyy) = 2 Then 39。標(biāo)示 mapFaceArr(xxx, yyy) = 3 MINE_NUM_LABEL = MINE_NUM_LABEL 1 Call setMineImage(index, 14) Call setNowMines ElseIf mapFaceArr(xxx, yyy) = 3 Then 39。疑似 mapFaceArr(xxx, yyy) = 1 Call setMineImage(index, 9) End If清除未靠近地雷的方塊:Private Sub doClear(ByVal x As Integer, _ ByVal y As Integer, _ ByVal index As Integer) MINE_NUM_CLEAR = MINE_NUM_CLEAR + 1 For xx = x 1 To x + 1 For yy = y 1 To y + 1 If xx = 0 And xx = MAP_X And _ yy = 0 And yy = MAP_Y Then If Not (xx = x And yy = y) Then If mapFaceArr(xx, yy) = 1 And _ mapArr(xx, yy) = 0 And _ mapArr(xx, yy) = 8 Then mapFaceArr(xx, yy) = 0 Select Case mapArr(xx, yy) Case 0 Call setMineImage((yy * MAP_X + xx), 10) Call doClear(xx, yy, (yy * MAP_X + xx)) Case 1 To 8 MINE_NUM_CLEAR = MINE_NUM_CLEAR + 1 Call setMineImage((yy * MAP_X + xx), mapArr(xx, yy)) End Select End If End If End If Next yy Next xxEnd Sub定時器Private Sub Timer1_Timer() TIME_COUNTER = TIME_COUNTER + 1 時間計數(shù)顯示 Call setNowTimer 設(shè)定狀態(tài)圖示 If TIME_COUNTER = 999 Then isDie = True = False mapFaceArr(xxx, yyy) = 0 Call showMine 39。設(shè)定狀態(tài)圖示 Call setStateImage MsgBox 您探測地雷的時間已超過,地雷已引爆。, , 超時 End IfEnd Sub致謝本研究及學(xué)位論文是在我的導(dǎo)師XX老師的親切關(guān)懷和悉心指導(dǎo)下完成的。他嚴(yán)肅的科學(xué)態(tài)度,嚴(yán)謹(jǐn)?shù)闹螌W(xué)精神,精益求精的工作作風(fēng),深深地感染和激勵著我。XX老師不僅在學(xué)業(yè)上給我以精心指導(dǎo),同時還在思想,生活上給我以無微不至的關(guān)懷,在此謹(jǐn)向XX老師致以誠摯的謝意和崇高的敬意。我還要感謝在一起愉快的度過畢業(yè)論文小組的同學(xué)們,正是由于你們的幫助和支持,我才能克服一個一個的困難和疑惑,甚至本文的順利完成。 在論文即將完成之際,我的心情無法平靜,從開始進入課題導(dǎo)論文的順利完成有多少可敬的師長,同學(xué),朋友給了我無言的幫助,在這里接受我誠摯的謝意。謝謝你們! 最后,再次對關(guān)心,幫助我的老師和同學(xué)表示衷心