如何用VB制作一个猜谜游戏?
私有子命令1_Click()
Cls
If选项1。值=真,则用户= 1
如果选项2。值=真,则用户= 2
如果选项2。值=真,则用户= 3
随机化计时器
computer = Int(Rnd * 3 + 1)
如果computer = 1,则label3.caption = "剪刀"
如果computer = 2thenlabel3。caption = "石头"
如果计算机= 3,则标签3。caption = "布"
a =用户计算机
如果a = 0,则打印“平面”
如果a = -1或a = 2,则打印“lose”
如果a = 1或a = -2,则打印“win”
末端接头
私有子窗体_Load()
Label1。Caption = "用户"
标签2。Caption = "计算机"
选项1。Caption = "剪刀"
选项2。Caption = "石头"
选项3。Caption = "布"
末端接头