| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 410 人关注过本帖
标题:[求助]本人编的一条游戏,有点问题谁能指导一下?
只看楼主 加入收藏
anlingdiao
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2007-4-4
收藏
 问题点数:0 回复次数:0 
[求助]本人编的一条游戏,有点问题谁能指导一下?

这是一个和电脑玩剪刀,石头,布的游戏
总觉得没有错,也可以运行,可是效果有点怪,有谁能帮偶纠正一下,感激不尽......
怪处就是当偶连续两次出同一样东西的时候,电脑也有可能出一样的,可是数字不会变
或者,连续两次出同一样时,电脑好象没有反映,
偶是初学,想来想去都想不出为什么?

Private Sub Command1_Click()
Image1.Visible = True
Image2.Visible = False
Image3.Visible = False
If Label3(Int(3 * Rnd)).Caption = "剪刀" Then
Image4.Visible = True
Image6.Visible = False
Image7.Visible = False
Label4.Caption = "平手不算!再来啊!"
Label1.Caption = Val(Label1.Caption)
Label2.Caption = Val(Label2.Caption)
End If
If Label3(Int(3 * Rnd)).Caption = "石头" Then
Image4.Visible = False
Image6.Visible = True
Image7.Visible = False
Label4.Caption = "哈哈,给点颜色你瞧瞧!"
Label1.Caption = Val(Label1.Caption) + 0
Label2.Caption = Val(Label2.Caption) + 1
End If
If Label3(Int(3 * Rnd)).Caption = "布" Then
Image4.Visible = False
Image6.Visible = False
Image7.Visible = True
Label4.Caption = "别得意,下次俺一定赢!"
Label1.Caption = Val(Label1.Caption) + 1
Label2.Caption = Val(Label2.Caption) + 0
End If
End Sub
Private Sub Command2_Click()
Image1.Visible = False
Image2.Visible = True
Image3.Visible = False
If Label3(Int(3 * Rnd)).Caption = "剪刀" Then
Image4.Visible = True
Image6.Visible = False
Image7.Visible = False
Label4.Caption = "别得意,下次俺一定赢!"
Label1.Caption = Val(Label1.Caption) + 1
Label2.Caption = Val(Label2.Caption) + 0
End If
If Label3(Int(3 * Rnd)).Caption = "石头" Then
Image4.Visible = False
Image6.Visible = True
Image7.Visible = False
Label4.Caption = "平手不算!再来啊!"
Label1.Caption = Val(Label1.Caption)
Label2.Caption = Val(Label2.Caption)
End If
If Label3(Int(3 * Rnd)).Caption = "布" Then
Image4.Visible = False
Image6.Visible = False
Image7.Visible = True
Label4.Caption = "哈哈,给点颜色你瞧瞧!"
Label1.Caption = Val(Label1.Caption) + 0
Label2.Caption = Val(Label2.Caption) + 1
End If
End Sub
Private Sub Command3_Click()
Image1.Visible = False
Image2.Visible = False
Image3.Visible = True
If Label3(Int(3 * Rnd)).Caption = "剪刀" Then
Image4.Visible = True
Image6.Visible = False
Image7.Visible = False
Label4.Caption = "哈哈,给点颜色你瞧瞧!"
Label1.Caption = Val(Label1.Caption) + 0
Label2.Caption = Val(Label2.Caption) + 1
End If
If Label3(Int(3 * Rnd)).Caption = "石头" Then
Image4.Visible = False
Image6.Visible = True
Image7.Visible = False
Label4.Caption = "别得意,下次俺一定赢!"
Label1.Caption = Val(Label1.Caption) + 1
Label2.Caption = Val(Label2.Caption) + 0
End If
If Label3(Int(3 * Rnd)).Caption = "布" Then
Image4.Visible = False
Image6.Visible = False
Image7.Visible = True
Label4.Caption = "平手不算!再来啊!"
Label1.Caption = Val(Label1.Caption)
Label2.Caption = Val(Label2.Caption)
End If
End Sub

Private Sub Command4_Click()
Label1.Caption = "0"
Label2.Caption = "0"
Label4.Caption = ""
Image1.Visible = False
Image2.Visible = False
Image3.Visible = False
Image4.Visible = False
Image6.Visible = False
Image7.Visible = False
End Sub

搜索更多相关主题的帖子: 游戏 指导 
2007-04-15 10:37
快速回复:[求助]本人编的一条游戏,有点问题谁能指导一下?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024410 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved