- Home
·
- Games
·
- Basic Tic-Tac-Toe Game. (Pretty Short Code)
Basic Tic-Tac-Toe Game. (Pretty Short Code)
Basic Tic-Tac-Toe Game. (Pretty Short Code)
Rate Basic Tic-Tac-Toe Game. (Pretty Short Code)
(1(1 Vote))
If lblblank(index).caption = "X" or lblblank(index).caption = "O" then
msgbox"Sorry but this spot is already used.",vbokonly,"Used Spot"
else
if lblturn.caption = "X" then
lblblank(index).caption = "X"
lblturn.caption = "O"
else
lblblank(index).caption = "O"
lblturn.caption = "X"
end if
end if
end sub
private sub cmdclear_click()
dim lbl as object
for each lbl in frmtictactoe
if typeof lbl is label then
lbl.caption = ""
end if
next
resp = msgbox("Is X going first this time?",vbyesno,"Turn?")
if resp = 6 then
lblturn.caption = "X"
else
lblturn.caption = "O"
end if
end sub
Basic Tic-Tac-Toe Game. (Pretty Short Code) Comments
No comments yet — be the first to post one!
Post a Comment