Everyone help to improve a bit, and then posted out, I was not changed!
Using ASP to realize the online "five-son alignment" contest
"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:
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&g