VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

A Tic Tac Game

Distubezz  (1 Submission)   Games   VB 6.0   Unknown Difficulty   Thu 6th March 2003   Mon 8th February 2021

A Tic Tac Game

API Declarations


Public intCounter As Integer
Public intButton
Public Caption
Public intCat As Integer


Function Remove(Tic)


If intCounter = 1 Then
frmTic(intButton).Caption = "X"
intCounter = 0
frmTic(intButton).Enabled = False
intCat = intCat + 1
GoTo ERC
End If

If intCounter = 0 Then
frmTic(intButton).Caption = "O"
intCounter = 1
frmTic(intButton).Enabled = False
intCat = intCat + 1
GoTo ERC

End If

ERC:

If frmTic.cmdTac1.Caption = "X" And frmTic.cmdTac2.Caption = "X" And frmTic.cmdTac3.Caption = "X" Or frmTic.cmdTac1.Caption = "X" And frmTic.cmdTac4.Caption = "X" And frmTic.cmdTac7.Caption = "X" Or frmTic.cmdTac1.Caption = "X" And frmTic.cmdTac5.Caption = "X" And frmTic.cmdTac9.Caption = "X" Then
MsgBox ("Congratulations X you won")
End If

If frmTic.cmdTac4.Caption = "X" And frmTic.cmdTac5.Caption = "X" And frmTic.cmdTac6.Caption = "X" Then
MsgBox ("Congratulations X you won")
End If

If frmTic.cmdTac7.Caption = "X" And frmTic.cmdTac8.Caption = "X" And frmTic.cmdTac9.Caption = "X" Or frmTic.cmdTac2.Caption = "X" And frmTic.cmdTac5.Caption = "X" And frmTic.cmdTac8.Caption = "X" Or frmTic.cmdTac3.Caption = "X" And frmTic.cmdTac6.Caption = "X" And frmTic.cmdTac9.Caption = "X" Then
MsgBox ("Congratulations X you won")
End If

If frmTic.cmdTac1.Caption = "O" And frmTic.cmdTac2.Caption = "O" And frmTic.cmdTac3.Caption = "O" Or frmTic.cmdTac1.Caption = "O" And frmTic.cmdTac4.Caption = "O" And frmTic.cmdTac7.Caption = "O" Or frmTic.cmdTac1.Caption = "O" And frmTic.cmdTac5.Caption = "O" And frmTic.cmdTac9.Caption = "O" Then
MsgBox ("Congratulations O you won")
End If

If frmTic.cmdTac4.Caption = "O" And frmTic.cmdTac5.Caption = "O" And frmTic.cmdTac6.Caption = "O" Then
MsgBox ("Congratulations O you won")
End If

If frmTic.cmdTac7.Caption = "O" And frmTic.cmdTac8.Caption = "O" And frmTic.cmdTac9.Caption = "O" Or frmTic.cmdTac2.Caption = "O" And frmTic.cmdTac5.Caption = "O" And frmTic.cmdTac8.Caption = "O" Or frmTic.cmdTac3.Caption = "O" And frmTic.cmdTac6.Caption = "O" And frmTic.cmdTac9.Caption = "O" Then
MsgBox ("Congratulations O you won")
End If
End Function


Rate A Tic Tac Game (1(1 Vote))
A Tic Tac Game.bas

A Tic Tac Game Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters