Using ASP to realize online "Gobang" competition

Source: Internet
Author: User
Tags end visual studio
"Gobang" is very familiar to everyone is a kind of puzzle games, related game software is also very much, here I solemnly launched a new pure "network version" of the Gobang, it uses ASP as the development environment, so on the internet when there is no need to download client software, As long as you have a browser on it. You can also play this game on a local area network.

For the ASP, I do not want to do too much explanation, in the previous article, I have said a lot.

The process of the game is like this, we first login, then we can choose the battlefield, there are "Venus", "Jupiter", "Mercury", "Mars", "Saturn" and so on five battlefield, if you think you are a master, you can choose Venus, otherwise you can choose several other planets as battlefield. If there is no leizhu on the planet, you should enter it as a leizhu, and others will be able to play against you. Of course, if all the planets are already on the war, then you have to wait for a while.

If you enter as a Leizhu, you can wait for others to play against you, if you are logged in as a Hong hand, you can quickly fight with Leizhu. After the battle, the Leizhu by the black first, and then by the Hong hand, and so on. When the final outcome is decided, there will be a corresponding hint.

The site has several major files:

index.asp Login File:

index0.asp Intermediate File:

Match.asp Contest File:

Http://www.163design.net/a/y/back0.jpg white0.jpg black0.jpg used in the middle of the graphic files, respectively refers to the chessboard, white and black, the following figure:

In the initialization of the program, the board will be divided into several tables, the background picture into which to form a chessboard, and then put on a piece, and then change the picture to the corresponding white or sunspots on it.

First look at the login file:

<%@ Language=vbscript%>

<HTML>

<HEAD>

<meta name= "generator" content= "Microsoft Visual Studio 6.0" >

<title> Star Wars "five-Child alignment" Contest! </title>

</HEAD>

<BODY>

 

<p align=center><font size=6> Star Wars </font></P>

<table border=1 width=80% align=center>

<tr><td> Planet </td><td> Leizhu </td><td> war </td><td> Hong </td></tr >

<tr>

<td> Venus </td>

<td>

<%

If Application ("first1") = "" Then

%>

<form Action=index0.asp?flag=first1 method=post>

<input id=text1 name=txtfirst1 size=10><input id=submit1 name=submit1
Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("First1")

End If

%>

</td>

<td> War </td>

<td>

<%

If Application ("second1") = "" Then

%>

 

<form Action=index0.asp?flag=second1 method=post>

<input id=text1 name=txtsecond1 size=10><input id=submit1
Name=submit1 Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("Second1")

End If

%>

</td>

</tr>

 

<tr>

<td> Jupiter </td>

<td>

<%

If Application ("first2") = "" Then

%>

<form Action=index0.asp?flag=first2 method=post>

<input id=text1 name=txtfirst2 size=10><input id=submit1 name=submit1
Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("First2")

End If

%>

</td>

<td> War </td>

<td>

<%

If Application ("second2") = "" Then

%>

 

<form Action=index0.asp?flag=second2 method=post>

<input id=text1 name=txtsecond2 size=10><input id=submit1
Name=submit1 Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("Second2")

End If

%>

</td>

</tr>

 

<tr>

<td> Venus </td>

<td>

<%

If Application ("first3") = "" Then

%>

<form Action=index0.asp?flag=first3 method=post>

<input id=text1 name=txtfirst3 size=10><input id=submit1 name=submit1
Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("First3")

End If

%>

</td>

<td> War </td>

<td>

<%

If Application ("second3") = "" Then

%>

 

<form Action=index0.asp?flag=second3 method=post>

<input id=text1 Name=txtsecond3 size=10><input id=submit1
Name=submit1 Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("Second3")

End If

%>

</td>

</tr>

 

<tr>

<td> Venus </td>

<td>

<%

If Application ("first4") = "" Then

%>

<form Action=index0.asp?flag=first4 method=post>

<input id=text1 name=txtfirst4 size=10><input id=submit1 name=submit1
Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("First4")

End If

%>

</td>

<td> War </td>

<td>

<%

If Application ("Second4") = "" Then

%>

 

<form Action=index0.asp?flag=second4 method=post>

<input id=text1 Name=txtsecond4 size=10><input id=submit1
Name=submit1 Type=submit value= Enter >

</form>

<%

Else

Response.Write Application ("Second4")

End If

%>

</td>

</tr>

 

<tr>

<td> Venus <



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.