ASP程序石头剪子布

来源:百度知道 编辑:UC知道 时间:2024/05/15 02:27:41
谁能提供该游戏的ASP程序?谢谢啦~急!

<body>
<%
dim wq,b,c,result
dim a(3)
wq=request.form("tool")
a(1)="石头"
a(2)="剪刀"
a(3)="布"
c="-------------------"

Randomize
b=int(3*Rnd+1)
if wq="" then
a(b)=""
c=""
result=""
else
Select case wq
case "石头"
select case a(b)
case "石头"
result="我们平手了!"
case "剪刀"
result="恭喜啦,你赢了!"
case "布"
result="你输了,加油啊!"
end select
case "剪刀"
select case a(b)
case "石头"
result="你输了,加油啊!"
case "剪刀"
result="我们平手了!"
case "布"
result="恭喜啦,你赢了!"
end select
case "布"
select case a(b)
case "石头"
result="恭喜啦,你赢了!"