当前位置: 网学 > 编程文档 > ASP > 正文

用ASP实现网上“五子棋”大赛

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/17
下载{$ArticleTitle}原创论文样式
f application("color" & session("class") & "_" & cstr(i) & "_" &
cstr(j))=h then

five_me=0

five_he=five_he+1

else

five_me=0

five_he=0

end if

if five_me=5 then

win=true

loss=false

exit for

elseif five_he=5 then

win=false

loss=true

exit for

end if

next

if win or loss then exit for

next

if win then

response.write "你赢了!"

application(application("first" & session("class")))=false

application(application("second" & session("class")))=false

end if

if loss then

response.write "对不起,你输了!"

application(application("first" & session("class")))=false

application(application("second" & session("class")))=false

end if

 

''列向判断"|"

for j=1 to 15

win=false

loss=false

five_me=0

five_he=0

for i=1 to 15

if application("color" & session("class") & "_" & cstr(i) & "_" & cstr
(j))=m then

five_me=five_me+1

five_he=0

elseif application("color" & session("class") & "_" & cstr(i) & "_" &
cstr(j))=h then

five_me=0

five_he=five_he+1

else

five_me=0

five_he=0

end if

if five_me=5 then

win=true

loss=false

exit for

elseif five_he=5 then

win=false

loss=true

exit for

end if

next

if win or loss then exit for

next

if win then

response.write "你赢了!"

application(application("first" & session("class")))=false

application(application("second" & session("class")))=false

end if

if loss then

response.write "对不起,你输了!"

application(application("first" & session("class")))=false

application(application("second" & session("class")))=false

end if

 

''斜向判断"/"

for i=1 to 11

win=false

loss=false

five_me=0

five_he=0

for j=i+4 to 1 step -1

if application("color" & session("class") & "_" & cstr(j) & "_" & cstr
(i+5-j))=m then

five_me=five_me+1

five_he=0

elseif application("color" & session("class") & "_" & cstr(j) & "_" &
cstr(i+5-j))=h then

five_me=0

five_he=five_he+1

else

five_me=0

five_he=0

end if

if five_me=5 then

win=true

loss=false

exit for

elseif five_he=5 then

win=false

loss=true

exit for

end if

next

if win or loss then exit for

next

if win then

response.write "你赢了!"

application(application("first" & session("class")))=false

application(application("second" & session("class")))=false

end if

if loss then

response.write "对不起,你输了!"

application(application("first" & session("class")))=false

application(application("second" & session("class")))=false

end if

 

''斜向判断"\"

for i=1 to 11

win=false

loss=false

five_me=0

five_he=0

for j=12-i to 15

if application("color" & session("class")

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号