Private Sub Timer1_Timer() Dim ms As Boolean Dim Info, temp As String Dim p, p1, p2, i As Integer Dim Ch ' Begin of Time Show Process If ModemState <> LOGIN And SocketState <> CONNECTED Then 'it is not a multiusers game Exit Sub Else If (S_R = 1) And (TURN = BLACKP) Then Black_Time = Black_Time + Time - Start_Time TimeB.Caption = CDate(Black_Time / 200) Else If (S_R = 1) And (TURN = WHITEP) Then White_Time = White_Time + Time - Start_Time TimeW.Caption = CDate(White_Time / 200) Else If (S_R = 0) And (TURN = WHITEP) Then Black_Time = Black_Time + Time - Start_Time TimeB.Caption = CDate(Black_Time / 200) Else If (S_R = 0) And (TURN = BLACKP) Then White_Time = White_Time + Time - Start_Time TimeW.Caption = CDate(White_Time / 200) End If End If End If End If End If 'End If ' End of Time Show Process
Dim ms As Boolean
Dim Info, temp As String
Dim p, p1, p2, i As Integer
Dim Ch
' Begin of Time Show Process
If ModemState <> LOGIN And SocketState <> CONNECTED Then
'it is not a multiusers game
Exit Sub
Else
If (S_R = 1) And (TURN = BLACKP) Then
Black_Time = Black_Time + Time - Start_Time
TimeB.Caption = CDate(Black_Time / 200)
Else
If (S_R = 1) And (TURN = WHITEP) Then
White_Time = White_Time + Time - Start_Time
TimeW.Caption = CDate(White_Time / 200)
Else
If (S_R = 0) And (TURN = WHITEP) Then
Black_Time = Black_Time + Time - Start_Time
TimeB.Caption = CDate(Black_Time / 200)
Else
If (S_R = 0) And (TURN = BLACKP) Then
White_Time = White_Time + Time - Start_Time
TimeW.Caption = CDate(White_Time / 200)
End If
End If
End If
End If
End If
' End of Time Show Process
'Begin of winsockt process
If SocketState = CONNECTED And Begin_Flag = 1 Then
ms = Net.Message_Exist
If ms = False Then
Exit Sub
End If
Info = Net.WaitForValue(Chr$(26), 5)
If g_ErrorCode = 1 Then
'Some error such as Timeout occured
Exit Sub
End If
p1 = InStr(Info, "B")
p2 = InStr(Info, "E|;")
If p1 = 0 Or p2 = 0 Then
Exit Sub
End If
temp = Mid$(Info, p1 + 1, p2 - p1 - 1)
ParseLine (temp)
Msg(Msg_No).No = CInt(ParseArray(1))
Msg(Msg_No).Color = CInt(ParseArray(2))
If IsNumeric(ParseArray(3)) Then
Msg(Msg_No).X = CInt(ParseArray(3))
Msg(Msg_No).Y = CInt(ParseArray(4))
Else
Msg(Msg_No).X = ParseArray(3)
Msg(Msg_No).Y = ParseArray(4)
剩余8页未读,继续阅读
- archlen2016-01-15简陋的无以复加,接近一个局域网的聊天工具。连基本的围棋落子判断死活、禁手、提吃都没有。
- 粉丝: 0
- 资源: 1
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- paho.mqtt.javascript.zip
- Packt 发布的《Java 编码问题》.zip
- OpenTelemetry Java SDK.zip
- OBD-II Java API.zip
- 一个支持多人游玩的Flappy-Bird变种游戏, Java编写.zip
- 一个用 Java 实现的贪吃蛇小游戏.zip
- 一个利用Java Swing实现可视化界面的扫雷小游戏.zip
- 一个简单ssh(spring springMVC hibernate)游戏网站,在网上找的html模板,没有自己写UI,重点放在java后端上.zip
- 一个使用Java完成的仿超级玛丽小游戏.zip
- 一个利用java语言制作的简单飞机游戏.zip