請大佬幫我翻譯一下 這段2048移動格子的部分 真的是沒搞懂 急用
Private Sub MoveBox(ByVal Fx As Integer)
Dim B As Integer, N As Integer, S As Integer
Dim R As Integer, C As Integer, K As Integer
Dim bMove As Boolean
If Fx < 3 Then '左右移動
If Fx = 1 Then
B = 1: N = 3: S = 1
Else
B = 2: N = 0: S = -1
End If
For R = 0 To 3
K = IIf(Fx = 1, 0, 3)
For C = B To N Step S
If BoxValue(R, C) > 0 Then
If (BoxValue(R, C) = BoxValue(R, K)) Then
DrawBox BoxValue(R, C) * 2, R, K
DrawBox 0, R, C
Score = Score + BoxValue(R, K)
If BoxValue(R, K) = 2048 Then
MsgBox "哇塞!太厲害了!佩服佩服~",
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/30180.html
標籤:VB基礎類
上一篇:Data Report在win7下列印會在換頁的時候少打一行
下一篇:Excel VBA基礎(一)
