Лабораторная работа: Greating game on visual basic with multiplayer system

Call dxplay. Send (MyPlayer, DPID_ALLPLAYERS, DPSEND_GUARANTEED, dpmsg)

Call CloseDownDPlay

Unload Connect

onconnect = False

End Sub

Private Sub newgame_Click () 'starts new game single or multiplayer

On Error GoTo NoGame

If usermode = "client" And multiplayermode = True Then

MsgBox "Only the host can restart the game. ", vbOKOnly, "Tic Tac Oops"

Exit Sub

End If

If multiplayermode = False Then

usermode = "host"

Call Initialize

Else

Call restart_Click 'call restart routine for multiplayer

End If

Exit Sub

NoGame:

MsgBox "Could Not Start Game. ", vbOKOnly, "Oops"

Exit Sub

End Sub

Public Sub o_Click () 'sets menu item whos first o

If GameUnderway = True Then

MsgBox "You cannot chang this option while a game is in play", vbOKOnly, "Tic Tac Oops"

Exit Sub

End If

If o. Checked = True Then

sw = False

К-во Просмотров: 867
Бесплатно скачать Лабораторная работа: Greating game on visual basic with multiplayer system