home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form2
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "Playing Field"
- ClientHeight = 1905
- ClientLeft = 465
- ClientTop = 3945
- ClientWidth = 3015
- Height = 2310
- Icon = FORM2.FRX:0000
- Left = 405
- LinkTopic = "Form2"
- MaxButton = 0 'False
- ScaleHeight = 1905
- ScaleWidth = 3015
- Top = 3600
- Width = 3135
- Begin CommandButton Command11
- Caption = "Quit"
- Height = 375
- Left = 2160
- TabIndex = 16
- Top = 1080
- Width = 735
- End
- Begin CommandButton Command10
- Caption = "About"
- Height = 375
- Left = 2160
- TabIndex = 12
- Top = 360
- Width = 735
- End
- Begin CommandButton Command9
- BackColor = &H0000FF00&
- Caption = "?"
- Height = 375
- Left = 1320
- TabIndex = 8
- Top = 1320
- Width = 375
- End
- Begin CommandButton Command8
- Caption = "?"
- Height = 375
- Left = 720
- TabIndex = 7
- Top = 1320
- Width = 375
- End
- Begin CommandButton Command7
- Caption = "?"
- Height = 375
- Left = 120
- TabIndex = 6
- Top = 1320
- Width = 375
- End
- Begin CommandButton Command6
- Caption = "?"
- Height = 375
- Left = 1320
- TabIndex = 5
- Top = 720
- Width = 375
- End
- Begin CommandButton Command5
- Caption = "?"
- Height = 375
- Left = 720
- TabIndex = 4
- Top = 720
- Width = 375
- End
- Begin CommandButton Command4
- Caption = "?"
- Height = 375
- Left = 120
- TabIndex = 3
- Top = 720
- Width = 375
- End
- Begin CommandButton Command3
- Caption = "?"
- Height = 375
- Left = 1320
- TabIndex = 2
- Top = 120
- Width = 375
- End
- Begin CommandButton Command2
- Caption = "?"
- Height = 375
- Left = 720
- TabIndex = 1
- Top = 120
- Width = 375
- End
- Begin CommandButton Command1
- Caption = "?"
- Height = 375
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 375
- End
- Begin TextBox Text1
- Height = 285
- Left = 2520
- LinkItem = "Send"
- LinkTopic = "CRoom|Croom"
- TabIndex = 19
- Text = "Text1"
- Top = 360
- Width = 180
- End
- Begin CommandButton Command12
- Caption = "Simulate Opponent"
- Height = 255
- Left = 2400
- TabIndex = 18
- Top = 1080
- Width = 255
- End
- Begin Line Line4
- BorderColor = &H00FF0000&
- BorderWidth = 3
- X1 = 1200
- X2 = 1200
- Y1 = 120
- Y2 = 1800
- End
- Begin Line Line3
- BorderColor = &H00FF0000&
- BorderWidth = 3
- X1 = 600
- X2 = 600
- Y1 = 120
- Y2 = 1800
- End
- Begin Line Line2
- BorderColor = &H00FF0000&
- BorderWidth = 3
- X1 = 1800
- X2 = 0
- Y1 = 1200
- Y2 = 1200
- End
- Begin Line Line1
- BorderColor = &H00FF0000&
- BorderWidth = 3
- X1 = 0
- X2 = 1800
- Y1 = 600
- Y2 = 600
- End
- Begin Label Label7
- Caption = "Label7"
- Height = 135
- Left = 2520
- LinkItem = "Croom"
- LinkTopic = "Croom|Croom"
- TabIndex = 17
- Top = 360
- Width = 135
- End
- Begin Label Label6
- Caption = "0"
- Height = 255
- Left = 2400
- TabIndex = 15
- Top = 360
- Width = 135
- End
- Begin Label Label5
- Caption = "0"
- Height = 255
- Left = 2280
- TabIndex = 14
- Top = 360
- Width = 135
- End
- Begin Label Label4
- Caption = "0"
- Height = 255
- Left = 2400
- TabIndex = 13
- Top = 360
- Width = 135
- End
- Begin Label Label3
- Caption = "Tie"
- Height = 255
- Left = 2640
- TabIndex = 11
- Top = 360
- Width = 135
- End
- Begin Label Label2
- Caption = "Loss"
- Height = 255
- Left = 2520
- TabIndex = 10
- Top = 360
- Width = 135
- End
- Begin Label Label1
- Caption = "Win"
- Height = 255
- Left = 2280
- TabIndex = 9
- Top = 360
- Width = 135
- End
- Sub Command1_Click ()
- C1 = 1
- Command1.Enabled = False
- Command1.FontSize = 12
- Command1.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "1"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command10_Click ()
- 'msg = "Copyright 1994, Virtual Systems V 0.1b"
- 'MsgBox msg
- AboutTTT.Show
- End Sub
- Sub Command11_Click ()
- End
- End Sub
- Sub Command12_Click ()
- Text1 = "{d " + Text1 + "," + yourself + "," + Chr$(48 + (Int(Rnd(1) * 9)))
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command2_Click ()
- C2 = 1
- Command2.Enabled = False
- Command2.FontSize = 12
- Command2.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "2"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- ' If Whowon() = 1 Then
- ' msg = "You Win!!"
- ' MsgBox msg
- ' Else
- ' If Whowon() = 2 Then
- ' msg = "You Lose."
- ' MsgBox msg
- ' Else
- ' If Whowon() = 3 Then
- ' msg = "It's a tie."
- '' MsgBox msg
- ' End If
- ' End If
- ' End If
- End Sub
- Sub Command3_Click ()
- C3 = 1
- Command3.Enabled = False
- Command3.FontSize = 12
- Command3.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "3"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command4_Click ()
- C4 = 1
- Command4.Enabled = False
- Command4.FontSize = 12
- Command4.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "4"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command5_Click ()
- C5 = 1
- Command5.Enabled = False
- Command5.FontSize = 12
- Command5.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "5"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command6_Click ()
- C6 = 1
- Command6.Enabled = False
- Command6.FontSize = 12
- Command6.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "6"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command7_Click ()
- C7 = 1
- Command7.Enabled = False
- Command7.FontSize = 12
- Command7.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "7"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command8_Click ()
- C8 = 1
- Command8.Enabled = False
- Command8.FontSize = 12
- Command8.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "8"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Command9_Click ()
- C9 = 1
- Command9.Enabled = False
- Command9.FontSize = 12
- Command9.Caption = Marker
- setmodes
- Text1 = "{d " + "TTT" + "," + opponent + "," + "9"
- Text1.LinkMode = 2 ' This takes the text in the
- Text1.LinkPoke ' edit control and sends it via
- Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- Text1 = ""
- End Sub
- Sub Form_Load ()
- label7.LinkMode = 1 'automatic??? Hopefully.
- msg = yourself + ", your opponent will be: " + opponent
- MsgBox msg
- Unload form1
- C1 = 0
- C2 = 0
- C3 = 0
- C4 = 0
- C5 = 0
- C6 = 0
- C7 = 0
- C8 = 0
- C9 = 0
- If CurrentMove = "X" And Marker = "O" Then
- Command1.Enabled = False
- Command2.Enabled = False
- Command3.Enabled = False
- Command4.Enabled = False
- Command5.Enabled = False
- Command6.Enabled = False
- Command7.Enabled = False
- Command8.Enabled = False
- Command9.Enabled = False
- End If
-
- 'firstmove = "noone"
- 'If firstmove <> yourself Or firstmove <> opponent Then
- ' gofirst = Int(Rnd(1) * 10) + 1
- ' Text1 = "{d " + "TTG" + "," + opponent + "," + gofirst
- ' Text1.LinkMode = 2 ' This takes the text in the
- ' Text1.LinkPoke ' edit control and sends it via
- ' Text1.LinkMode = 0 ' DDE to the C-Room "Send Text"
- ' temp = label7
- ' For lp = 1 To 11
- ' If Mid$(temp, lp, 1) = ":" Then
- ' temp = Mid$(temp, lp + 2, (Len(temp) - (lp + 1)))
- ' End If
- ' Next
- ' temp = Mid$(temp, 4, (Len(temp)))
- ' game = Mid$(temp, 1, 3)
- ' For lp = 1 To 9
- ' If Mid$(temp, lp, 1) = "," Then
- ' otherguy = Mid$(temp, 1, lp - 1)
- ' rndnum = Mid$(temp, lp + 1, (Len(temp) - (lp - 1)))
- ' End If
- ' Next
-
-
- ' If game = "TTG" Then
- ' If rndnum < gofirst Then marker
- 'marker = "X"
- 'establish link here
- ' i.e. send data
- ' check responsese until you see the one you want.
- ' start actual game
- End Sub
- Sub Label7_Change ()
- ' more testing stuff
- 'Text1 = "Testing"
- 'more testing stuff
- temp = label7
- For lp = 1 To 11
- If Mid$(temp, lp, 1) = ":" Then
- temp = Mid$(temp, lp + 2, (Len(temp) - (lp + 1)))
- End If
- Next
- temp = Mid$(temp, 4, (Len(temp)))
- game = Mid$(temp, 1, 3)
- For lp = 1 To 9
- If Mid$(temp, lp, 1) = "," Then
- OtherGuy = Mid$(temp, 1, lp - 1)
- temp = Mid$(temp, lp + 1, (Len(temp) - (lp - 1)))
- 'Text1 = game + "-" + plname + "-" + temp
- End If
- Next
- 'MsgBox yourself + temp + otherguy
- If OtherGuy = yourself Then
-
- If temp = 9 Then
- Command9.Enabled = False
- Command9.FontSize = 12
- Command9.Caption = OMarker
- C9 = 1
- End If
- If temp = 8 Then
- Command8.Enabled = False
- Command8.FontSize = 12
- Command8.Caption = OMarker
- C8 = 1
- End If
-
- If temp = 7 Then
- Command7.Enabled = False
- Command7.FontSize = 12
- Command7.Caption = OMarker
- C7 = 1
- End If
-
- If temp = 6 Then
- Command6.Enabled = False
- Command6.FontSize = 12
- Command6.Caption = OMarker
- C6 = 1
- End If
-
- If temp = 5 Then
- Command5.Enabled = False
- Command5.FontSize = 12
- Command5.Caption = OMarker
- C5 = 1
- End If
-
- If temp = 4 Then
- Command4.Enabled = False
- Command4.FontSize = 12
- Command4.Caption = OMarker
- C4 = 1
- End If
-
- If temp = 3 Then
- Command3.Enabled = False
- Command3.FontSize = 12
- Command3.Caption = OMarker
- C3 = 1
- End If
-
- If temp = 2 Then
- Command2.Enabled = False
- Command2.FontSize = 12
- Command2.Caption = OMarker
- C2 = 1
- End If
-
- If temp = 1 Then
- Command1.Enabled = False
- Command1.FontSize = 12
- Command1.Caption = OMarker
- C1 = 1
- End If
- setmodes
- OtherGuy = ""
- End If
-
- End Sub
- Sub setmodes ()
- If CurrentMove = "X" Then
- CurrentMove = "O"
- Else
- CurrentMove = "X"
- End If
- If Marker = "X" And CurrentMove = "X" Then
- If C1 = 0 Then Command1.Enabled = True
- If C2 = 0 Then Command2.Enabled = True
- If C3 = 0 Then Command3.Enabled = True
- If C4 = 0 Then Command4.Enabled = True
- If C5 = 0 Then Command5.Enabled = True
- If C6 = 0 Then Command6.Enabled = True
- If C7 = 0 Then Command7.Enabled = True
- If C8 = 0 Then Command8.Enabled = True
- If C9 = 0 Then Command9.Enabled = True
- End If
- If Marker = "X" And CurrentMove = "O" Then
- Command1.Enabled = False
- Command2.Enabled = False
- Command3.Enabled = False
- Command4.Enabled = False
- Command5.Enabled = False
- Command6.Enabled = False
- Command7.Enabled = False
- Command8.Enabled = False
- Command9.Enabled = False
- End If
- If Marker = "O" And CurrentMove = "X" Then
- Command1.Enabled = False
- Command2.Enabled = False
- Command3.Enabled = False
- Command4.Enabled = False
- Command5.Enabled = False
- Command6.Enabled = False
- Command7.Enabled = False
- Command8.Enabled = False
- Command9.Enabled = False
- End If
- If Marker = "O" And CurrentMove = "O" Then
- If C1 = 0 Then Command1.Enabled = True
- If C2 = 0 Then Command2.Enabled = True
- If C3 = 0 Then Command3.Enabled = True
- If C4 = 0 Then Command4.Enabled = True
- If C5 = 0 Then Command5.Enabled = True
- If C6 = 0 Then Command6.Enabled = True
- If C7 = 0 Then Command7.Enabled = True
- If C8 = 0 Then Command8.Enabled = True
- If C9 = 0 Then Command9.Enabled = True
- End If
- WhoWon
- End Sub
- Sub WhoWon ()
- XWin = 0
- OWin = 0
- If Command1.Caption = "X" And Command2.Caption = "X" And Command3.Caption = "X" Then
- XWin = 1
- Else
- If Command4.Caption = "X" And Command5.Caption = "X" And Command6.Caption = "X" Then
- XWin = 1
- Else
- If Command7.Caption = "X" And Command8.Caption = "X" And Command9.Caption = "X" Then
- XWin = 1
- Else
- If Command1.Caption = "X" And Command4.Caption = "X" And Command7.Caption = "X" Then
- XWin = 1
- Else
- If Command2.Caption = "X" And Command5.Caption = "X" And Command8.Caption = "X" Then
- XWin = 1
- Else
- If Command3.Caption = "X" And Command6.Caption = "X" And Command9.Caption = "X" Then
- XWin = 1
- Else
- If Command1.Caption = "X" And Command5.Caption = "X" And Command9.Caption = "X" Then
- XWin = 1
- Else
- If Command3.Caption = "X" And Command5.Caption = "X" And Command7.Caption = "X" Then
- XWin = 1
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- If Command1.Caption = "O" And Command2.Caption = "O" And Command3.Caption = "O" Then
- OWin = 1
- Else
- If Command4.Caption = "O" And Command5.Caption = "O" And Command6.Caption = "O" Then
- OWin = 1
- Else
- If Command7.Caption = "O" And Command8.Caption = "O" And Command9.Caption = "O" Then
- OWin = 1
- Else
- If Command1.Caption = "O" And Command4.Caption = "O" And Command7.Caption = "O" Then
- OWin = 1
- Else
- If Command2.Caption = "O" And Command5.Caption = "O" And Command8.Caption = "O" Then
- OWin = 1
- Else
- If Command3.Caption = "O" And Command6.Caption = "O" And Command9.Caption = "O" Then
- OWin = 1
- Else
- If Command1.Caption = "O" And Command5.Caption = "O" And Command9.Caption = "O" Then
- OWin = 1
- Else
- If Command3.Caption = "O" And Command5.Caption = "O" And Command7.Caption = "O" Then
- OWin = 1
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- End If
-
- If XWin = 1 And Marker = "X" Then
- msg = "You Win!! :D"
- MsgBox msg
- End
- Else
- If XWin = 1 And Marker = "O" Then
- msg = "You lose.. :("
- MsgBox msg
- End
- Else
- If OWin = 1 And Marker = "O" Then
- msg = "You Win!!! :D"
- MsgBox msg
- End
- Else
- If OWin = 1 And Marker = "X" Then
- msg = "You lose... :("
- MsgBox msg
- End
- End If
- End If
- End If
- End If
- If XWin = 0 And OWin = 0 And C1 = 1 And C2 = 1 And C3 = 1 And C4 = 1 And C5 = 1 And C6 = 1 And C7 = 1 And C8 = 1 And C9 = 1 Then
- msg = "It's a tie. "
- MsgBox msg
- End
- End If
- End Sub
-