Remove dangerous scripts and external links
@@ -1,16 +1,18 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>3DG</TITLE>
|
||||
</HEAD>
|
||||
<BODY bgcolor="Cornsilk">
|
||||
|
||||
<center><applet
|
||||
codebase="http://www.geocities.com/dantheman240/drivergame"
|
||||
code=Driver.class
|
||||
name=Driver
|
||||
width=400
|
||||
height=300>
|
||||
</applet></center>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>3DG</TITLE>
|
||||
</HEAD>
|
||||
<BODY bgcolor="Cornsilk">
|
||||
|
||||
<!--
|
||||
<center><applet
|
||||
codebase="http://www.geocities.com/dantheman240/drivergame"
|
||||
code=Driver.class
|
||||
name=Driver
|
||||
width=400
|
||||
height=300>
|
||||
</applet></center>
|
||||
-->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@@ -1,339 +1,339 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
.intro { font-size:10pt; font-style:italic }
|
||||
.heading { font-size:14pt; font-weight:bold; font-family:sans-serif }
|
||||
.title { font-size:18pt; font-weight:bold; background-color:navy; color:white; text-align:center; font-family:sans-serif }
|
||||
</style>
|
||||
</HEAD>
|
||||
|
||||
<title>Untitled</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="Cornsilk">
|
||||
|
||||
<center><h1>Battleship</h1><br><hr><br>
|
||||
<font color="Red">Good Luck!</font>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!-- Original: Jason Hotchkiss (jasonhotchkiss@home.com) -->
|
||||
<!-- Web Site: http://www.members.home.com/jasonhotchkiss -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
/* Information used to draw the ships
|
||||
*/
|
||||
var ship = [[[1,5], [1,2,5], [1,2,3,5], [1,2,3,4,5]], [[6,10], [6,7,10], [6,7,8,10], [6,7,8,9,10]]];
|
||||
|
||||
/* Information used to draw sunk ships
|
||||
*/
|
||||
var dead = [[[201,203], [201,202,203], [201,202,202,203], [201,202,202,202,203]], [[204,206], [204,205,206], [204,205,205,206], [204,205,205,205,206]]];
|
||||
|
||||
/* Information used to describe ships
|
||||
*/
|
||||
var shiptypes = [["Minesweeper",2,4],["Frigate",3,4],[ "Cruiser",4,2],[ "Battleship",5,1]];
|
||||
|
||||
var gridx = 16, gridy = 16;
|
||||
var player = [], computer = [], playersships = [], computersships = [];
|
||||
var playerlives = 0, computerlives = 0, playflag=true, statusmsg="";
|
||||
|
||||
/* Function to preload all the images, to prevent delays during play
|
||||
*/
|
||||
var preloaded = [];
|
||||
function imagePreload() {
|
||||
var i,ids = [1,2,3,4,5,6,7,8,9,10,100,101,102,103,201,202,203,204,205,206];
|
||||
window.status = "Preloading images...please wait";
|
||||
for (i=0;i<ids.length;++i) {
|
||||
var img = new Image, name = "batt"+ids[i]+".gif";
|
||||
img.src = name;
|
||||
preloaded[i] = img;
|
||||
}
|
||||
window.status = "";
|
||||
}
|
||||
|
||||
/* Function to place the ships in the grid
|
||||
*/
|
||||
function setupPlayer(ispc) {
|
||||
var y,x;
|
||||
grid = [];
|
||||
for (y=0;y<gridx;++y) {
|
||||
grid[y] = [];
|
||||
for (x=0;x<gridx;++x)
|
||||
grid[y][x] = [100,-1,0];
|
||||
}
|
||||
|
||||
var shipno = 0;
|
||||
var s;
|
||||
for (s=shiptypes.length-1;s>=0;--s) {
|
||||
var i;
|
||||
for (i=0;i<shiptypes[s][2];++i) {
|
||||
var d = Math.floor(Math.random()*2);
|
||||
var len = shiptypes[s][1], lx=gridx, ly=gridy, dx=0, dy=0;
|
||||
if ( d==0) {
|
||||
lx = gridx-len;
|
||||
dx=1;
|
||||
}
|
||||
else {
|
||||
ly = gridy-len;
|
||||
dy=1;
|
||||
}
|
||||
var x,y,ok;
|
||||
do {
|
||||
y = Math.floor(Math.random()*ly);
|
||||
x = Math.floor(Math.random()*lx);
|
||||
var j,cx=x,cy=y;
|
||||
ok = true;
|
||||
for (j=0;j<len;++j) {
|
||||
if (grid[cy][cx][0] < 100) {
|
||||
ok=false;
|
||||
break;
|
||||
}
|
||||
cx+=dx;
|
||||
cy+=dy;
|
||||
}
|
||||
} while(!ok);
|
||||
var j,cx=x,cy=y;
|
||||
for (j=0;j<len;++j) {
|
||||
grid[cy][cx][0] = ship[d][s][j];
|
||||
grid[cy][cx][1] = shipno;
|
||||
grid[cy][cx][2] = dead[d][s][j];
|
||||
cx+=dx;
|
||||
cy+=dy;
|
||||
}
|
||||
if (ispc) {
|
||||
computersships[shipno] = [s,shiptypes[s][1]];
|
||||
computerlives++;
|
||||
}
|
||||
else {
|
||||
playersships[shipno] = [s,shiptypes[s][1]];
|
||||
playerlives++;
|
||||
}
|
||||
shipno++;
|
||||
}
|
||||
}
|
||||
return grid;
|
||||
}
|
||||
|
||||
/* Function to change an image shown on a grid
|
||||
*/
|
||||
function setImage(y,x,id,ispc) {
|
||||
if ( ispc ) {
|
||||
computer[y][x][0] = id;
|
||||
document.images["pc"+y+"_"+x].src = "batt"+id+".gif";
|
||||
}
|
||||
else {
|
||||
player[y][x][0] = id;
|
||||
document.images["ply"+y+"_"+x].src = "batt"+id+".gif";
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to insert HTML source for a grid
|
||||
*/
|
||||
function showGrid(ispc) {
|
||||
var y,x;
|
||||
for (y=0;y<gridy;++y) {
|
||||
for (x=0;x<gridx;++x) {
|
||||
if ( ispc )
|
||||
document.write ('<a href="javascript:gridClick('+y+','+x+');"><img name="pc'+y+'_'+x+'" src="batt100.gif" width=16 height=16></a>');
|
||||
else
|
||||
document.write ('<a href="javascript:void(0);"><img name="ply'+y+'_'+x+'" src="batt'+player[y][x][0]+'.gif" width=16 height=16></a>');
|
||||
}
|
||||
document.write('<br>');
|
||||
}
|
||||
}
|
||||
|
||||
/* Handler for clicking on the grid
|
||||
*/
|
||||
function gridClick(y,x) {
|
||||
if ( playflag ) {
|
||||
if (computer[y][x][0] < 100) {
|
||||
setImage(y,x,103,true);
|
||||
var shipno = computer[y][x][1];
|
||||
if ( --computersships[shipno][1] == 0 ) {
|
||||
sinkShip(computer,shipno,true);
|
||||
alert("You sank my "+shiptypes[computersships[shipno][0]][0]+"!");
|
||||
updateStatus();
|
||||
if ( --computerlives == 0 ) {
|
||||
alert("You win! Press the Refresh button on\n"+
|
||||
"your browser to play another game.");
|
||||
playflag = false;
|
||||
}
|
||||
}
|
||||
if ( playflag ) computerMove();
|
||||
}
|
||||
else if (computer[y][x][0] == 100) {
|
||||
setImage(y,x,102,true);
|
||||
computerMove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to make the computers move. Note that the computer does not cheat, oh no!
|
||||
*/
|
||||
function computerMove() {
|
||||
var x,y,pass;
|
||||
var sx,sy;
|
||||
var selected = false;
|
||||
|
||||
/* Make two passes during 'shoot to kill' mode
|
||||
*/
|
||||
for (pass=0;pass<2;++pass) {
|
||||
for (y=0;y<gridy && !selected;++y) {
|
||||
for (x=0;x<gridx && !selected;++x) {
|
||||
/* Explosion shown at this position
|
||||
*/
|
||||
if (player[y][x][0]==103) {
|
||||
sx=x; sy=y;
|
||||
var nup=(y>0 && player[y-1][x][0]<=100);
|
||||
var ndn=(y<gridy-1 && player[y+1][x][0]<=100);
|
||||
var nlt=(x>0 && player[y][x-1][0]<=100);
|
||||
var nrt=(x<gridx-1 && player[y][x+1][0]<=100);
|
||||
if ( pass == 0 ) {
|
||||
/* On first pass look for two explosions
|
||||
in a row - next shot will be inline
|
||||
*/
|
||||
var yup=(y>0 && player[y-1][x][0]==103);
|
||||
var ydn=(y<gridy-1 && player[y+1][x][0]==103);
|
||||
var ylt=(x>0 && player[y][x-1][0]==103);
|
||||
var yrt=(x<gridx-1 && player[y][x+1][0]==103);
|
||||
if ( nlt && yrt) { sx = x-1; selected=true; }
|
||||
else if ( nrt && ylt) { sx = x+1; selected=true; }
|
||||
else if ( nup && ydn) { sy = y-1; selected=true; }
|
||||
else if ( ndn && yup) { sy = y+1; selected=true; }
|
||||
}
|
||||
else {
|
||||
/* Second pass look for single explosion -
|
||||
fire shots all around it
|
||||
*/
|
||||
if ( nlt ) { sx=x-1; selected=true; }
|
||||
else if ( nrt ) { sx=x+1; selected=true; }
|
||||
else if ( nup ) { sy=y-1; selected=true; }
|
||||
else if ( ndn ) { sy=y+1; selected=true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !selected ) {
|
||||
/* Nothing found in 'shoot to kill' mode, so we're just taking
|
||||
potshots. Random shots are in a chequerboard pattern for
|
||||
maximum efficiency, and never twice in the same place
|
||||
*/
|
||||
do{
|
||||
sy = Math.floor(Math.random() * gridy);
|
||||
sx = Math.floor(Math.random() * gridx/2)*2+sy%2;
|
||||
} while( player[sy][sx][0]>100 );
|
||||
}
|
||||
if (player[sy][sx][0] < 100) {
|
||||
/* Hit something
|
||||
*/
|
||||
setImage(sy,sx,103,false);
|
||||
var shipno = player[sy][sx][1];
|
||||
if ( --playersships[shipno][1] == 0 ) {
|
||||
sinkShip(player,shipno,false);
|
||||
alert("I sank your "+shiptypes[playersships[shipno][0]][0]+"!");
|
||||
if ( --playerlives == 0 ) {
|
||||
knowYourEnemy();
|
||||
alert("I win! Press the Refresh button on\n"+
|
||||
"your browser to play another game.");
|
||||
playflag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Missed
|
||||
*/
|
||||
setImage(sy,sx,102,false);
|
||||
}
|
||||
}
|
||||
|
||||
/* When whole ship is hit, show it using changed graphics
|
||||
*/
|
||||
function sinkShip(grid,shipno,ispc) {
|
||||
var y,x;
|
||||
for (y=0;y<gridx;++y) {
|
||||
for (x=0;x<gridx;++x) {
|
||||
if ( grid[y][x][1] == shipno )
|
||||
if (ispc) setImage(y,x,computer[y][x][2],true);
|
||||
else setImage(y,x,player[y][x][2],false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Show location of all the computers ships - when player has lost
|
||||
*/
|
||||
function knowYourEnemy() {
|
||||
var y,x;
|
||||
for (y=0;y<gridx;++y) {
|
||||
for (x=0;x<gridx;++x) {
|
||||
if ( computer[y][x][0] == 103 )
|
||||
setImage(y,x,computer[y][x][2],true);
|
||||
else if ( computer[y][x][0] < 100 )
|
||||
setImage(y,x,computer[y][x][0],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Show how many ships computer has left
|
||||
*/
|
||||
function updateStatus() {
|
||||
var f=false,i,s = "Computer has ";
|
||||
for (i=0;i<computersships.length;++i) {
|
||||
if (computersships[i][1] > 0) {
|
||||
if (f) s=s+", "; else f=true;
|
||||
s = s + shiptypes[computersships[i][0]][0];
|
||||
}
|
||||
}
|
||||
if (!f) s = s + "nothing left, thanks to you!";
|
||||
statusmsg = s;
|
||||
window.status = statusmsg;
|
||||
}
|
||||
function setStatus() {
|
||||
window.status = statusmsg;
|
||||
}
|
||||
/* Start the game!
|
||||
*/
|
||||
imagePreload();
|
||||
player = setupPlayer(false);
|
||||
computer = setupPlayer(true);
|
||||
document.write("<center><table><tr><td align=center><p class='heading'>COMPUTER'S FLEET</p></td>"+
|
||||
"<td align=center><p class='heading'>PLAYER'S FLEET</p></td></tr><tr><td>");
|
||||
showGrid(true);
|
||||
document.write("</td><td>");
|
||||
showGrid(false);
|
||||
document.write("</td></tr></table></center>");
|
||||
updateStatus();
|
||||
setInterval("setStatus();", 500);
|
||||
// End -->
|
||||
</script>
|
||||
|
||||
<p class="intro">"...We have located the enemy fleet under the command of Admiral Komp<EFBFBD>ter,
|
||||
but do not yet have visual contact. We suggest the best course of action is to fire
|
||||
at random into their vicinity and listen for the impact of the shells...</p>
|
||||
<p class="intro">...Our intelligence sources indicate the composition of the enemy fleet is the same
|
||||
as our own, and has likewise been forced to resort to the same tactics as ourselves. In accordance with
|
||||
the rules of war, fire will be exchanged one shell at a time and vessels lost will be announced
|
||||
immediately...</p>
|
||||
<p class="intro">...As per your orders you have been placed directly in command of the fleet's guns. Select the target
|
||||
location by clicking in the left-hand grid above. The right hand grid shows the status of our own fleet.
|
||||
Information as to the remaining strength of the enemy will be relayed directly to your status bar...</p>
|
||||
<p class="intro">...We believe this battle will not be over until one or other fleet is sunk in it's entirety. Our gunners
|
||||
await your commands. We're counting on you, Sir..."</p>
|
||||
|
||||
<!-- STEP THREE: Save the battleship images into your web site directory
|
||||
|
||||
You can get the zip file by going to
|
||||
|
||||
http://javascript.internet.com/img/battleship/battleship.zip
|
||||
|
||||
then unzip the images and upload to your site. -->
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
.intro { font-size:10pt; font-style:italic }
|
||||
.heading { font-size:14pt; font-weight:bold; font-family:sans-serif }
|
||||
.title { font-size:18pt; font-weight:bold; background-color:navy; color:white; text-align:center; font-family:sans-serif }
|
||||
</style>
|
||||
</HEAD>
|
||||
|
||||
<title>Untitled</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="Cornsilk">
|
||||
|
||||
<center><h1>Battleship</h1><br><hr><br>
|
||||
<font color="Red">Good Luck!</font>
|
||||
|
||||
<!-- Original: Jason Hotchkiss (jasonhotchkiss@home.com) -->
|
||||
<!-- Web Site: http://www.members.home.com/jasonhotchkiss -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin -->
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
/* Information used to draw the ships
|
||||
*/
|
||||
var ship = [[[1,5], [1,2,5], [1,2,3,5], [1,2,3,4,5]], [[6,10], [6,7,10], [6,7,8,10], [6,7,8,9,10]]];
|
||||
|
||||
/* Information used to draw sunk ships
|
||||
*/
|
||||
var dead = [[[201,203], [201,202,203], [201,202,202,203], [201,202,202,202,203]], [[204,206], [204,205,206], [204,205,205,206], [204,205,205,205,206]]];
|
||||
|
||||
/* Information used to describe ships
|
||||
*/
|
||||
var shiptypes = [["Minesweeper",2,4],["Frigate",3,4],[ "Cruiser",4,2],[ "Battleship",5,1]];
|
||||
|
||||
var gridx = 16, gridy = 16;
|
||||
var player = [], computer = [], playersships = [], computersships = [];
|
||||
var playerlives = 0, computerlives = 0, playflag=true, statusmsg="";
|
||||
|
||||
/* Function to preload all the images, to prevent delays during play
|
||||
*/
|
||||
var preloaded = [];
|
||||
function imagePreload() {
|
||||
var i,ids = [1,2,3,4,5,6,7,8,9,10,100,101,102,103,201,202,203,204,205,206];
|
||||
window.status = "Preloading images...please wait";
|
||||
for (i=0;i<ids.length;++i) {
|
||||
var img = new Image, name = "batt"+ids[i]+".gif";
|
||||
img.src = name;
|
||||
preloaded[i] = img;
|
||||
}
|
||||
window.status = "";
|
||||
}
|
||||
|
||||
/* Function to place the ships in the grid
|
||||
*/
|
||||
function setupPlayer(ispc) {
|
||||
var y,x;
|
||||
grid = [];
|
||||
for (y=0;y<gridx;++y) {
|
||||
grid[y] = [];
|
||||
for (x=0;x<gridx;++x)
|
||||
grid[y][x] = [100,-1,0];
|
||||
}
|
||||
|
||||
var shipno = 0;
|
||||
var s;
|
||||
for (s=shiptypes.length-1;s>=0;--s) {
|
||||
var i;
|
||||
for (i=0;i<shiptypes[s][2];++i) {
|
||||
var d = Math.floor(Math.random()*2);
|
||||
var len = shiptypes[s][1], lx=gridx, ly=gridy, dx=0, dy=0;
|
||||
if ( d==0) {
|
||||
lx = gridx-len;
|
||||
dx=1;
|
||||
}
|
||||
else {
|
||||
ly = gridy-len;
|
||||
dy=1;
|
||||
}
|
||||
var x,y,ok;
|
||||
do {
|
||||
y = Math.floor(Math.random()*ly);
|
||||
x = Math.floor(Math.random()*lx);
|
||||
var j,cx=x,cy=y;
|
||||
ok = true;
|
||||
for (j=0;j<len;++j) {
|
||||
if (grid[cy][cx][0] < 100) {
|
||||
ok=false;
|
||||
break;
|
||||
}
|
||||
cx+=dx;
|
||||
cy+=dy;
|
||||
}
|
||||
} while(!ok);
|
||||
var j,cx=x,cy=y;
|
||||
for (j=0;j<len;++j) {
|
||||
grid[cy][cx][0] = ship[d][s][j];
|
||||
grid[cy][cx][1] = shipno;
|
||||
grid[cy][cx][2] = dead[d][s][j];
|
||||
cx+=dx;
|
||||
cy+=dy;
|
||||
}
|
||||
if (ispc) {
|
||||
computersships[shipno] = [s,shiptypes[s][1]];
|
||||
computerlives++;
|
||||
}
|
||||
else {
|
||||
playersships[shipno] = [s,shiptypes[s][1]];
|
||||
playerlives++;
|
||||
}
|
||||
shipno++;
|
||||
}
|
||||
}
|
||||
return grid;
|
||||
}
|
||||
|
||||
/* Function to change an image shown on a grid
|
||||
*/
|
||||
function setImage(y,x,id,ispc) {
|
||||
if ( ispc ) {
|
||||
computer[y][x][0] = id;
|
||||
document.images["pc"+y+"_"+x].src = "batt"+id+".gif";
|
||||
}
|
||||
else {
|
||||
player[y][x][0] = id;
|
||||
document.images["ply"+y+"_"+x].src = "batt"+id+".gif";
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to insert HTML source for a grid
|
||||
*/
|
||||
function showGrid(ispc) {
|
||||
var y,x;
|
||||
for (y=0;y<gridy;++y) {
|
||||
for (x=0;x<gridx;++x) {
|
||||
if ( ispc )
|
||||
document.write ('<a href="javascript:gridClick('+y+','+x+');"><img name="pc'+y+'_'+x+'" src="batt100.gif" width=16 height=16></a>');
|
||||
else
|
||||
document.write ('<a href="javascript:void(0);"><img name="ply'+y+'_'+x+'" src="batt'+player[y][x][0]+'.gif" width=16 height=16></a>');
|
||||
}
|
||||
document.write('<br>');
|
||||
}
|
||||
}
|
||||
|
||||
/* Handler for clicking on the grid
|
||||
*/
|
||||
function gridClick(y,x) {
|
||||
if ( playflag ) {
|
||||
if (computer[y][x][0] < 100) {
|
||||
setImage(y,x,103,true);
|
||||
var shipno = computer[y][x][1];
|
||||
if ( --computersships[shipno][1] == 0 ) {
|
||||
sinkShip(computer,shipno,true);
|
||||
alert("You sank my "+shiptypes[computersships[shipno][0]][0]+"!");
|
||||
updateStatus();
|
||||
if ( --computerlives == 0 ) {
|
||||
alert("You win! Press the Refresh button on\n"+
|
||||
"your browser to play another game.");
|
||||
playflag = false;
|
||||
}
|
||||
}
|
||||
if ( playflag ) computerMove();
|
||||
}
|
||||
else if (computer[y][x][0] == 100) {
|
||||
setImage(y,x,102,true);
|
||||
computerMove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to make the computers move. Note that the computer does not cheat, oh no!
|
||||
*/
|
||||
function computerMove() {
|
||||
var x,y,pass;
|
||||
var sx,sy;
|
||||
var selected = false;
|
||||
|
||||
/* Make two passes during 'shoot to kill' mode
|
||||
*/
|
||||
for (pass=0;pass<2;++pass) {
|
||||
for (y=0;y<gridy && !selected;++y) {
|
||||
for (x=0;x<gridx && !selected;++x) {
|
||||
/* Explosion shown at this position
|
||||
*/
|
||||
if (player[y][x][0]==103) {
|
||||
sx=x; sy=y;
|
||||
var nup=(y>0 && player[y-1][x][0]<=100);
|
||||
var ndn=(y<gridy-1 && player[y+1][x][0]<=100);
|
||||
var nlt=(x>0 && player[y][x-1][0]<=100);
|
||||
var nrt=(x<gridx-1 && player[y][x+1][0]<=100);
|
||||
if ( pass == 0 ) {
|
||||
/* On first pass look for two explosions
|
||||
in a row - next shot will be inline
|
||||
*/
|
||||
var yup=(y>0 && player[y-1][x][0]==103);
|
||||
var ydn=(y<gridy-1 && player[y+1][x][0]==103);
|
||||
var ylt=(x>0 && player[y][x-1][0]==103);
|
||||
var yrt=(x<gridx-1 && player[y][x+1][0]==103);
|
||||
if ( nlt && yrt) { sx = x-1; selected=true; }
|
||||
else if ( nrt && ylt) { sx = x+1; selected=true; }
|
||||
else if ( nup && ydn) { sy = y-1; selected=true; }
|
||||
else if ( ndn && yup) { sy = y+1; selected=true; }
|
||||
}
|
||||
else {
|
||||
/* Second pass look for single explosion -
|
||||
fire shots all around it
|
||||
*/
|
||||
if ( nlt ) { sx=x-1; selected=true; }
|
||||
else if ( nrt ) { sx=x+1; selected=true; }
|
||||
else if ( nup ) { sy=y-1; selected=true; }
|
||||
else if ( ndn ) { sy=y+1; selected=true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !selected ) {
|
||||
/* Nothing found in 'shoot to kill' mode, so we're just taking
|
||||
potshots. Random shots are in a chequerboard pattern for
|
||||
maximum efficiency, and never twice in the same place
|
||||
*/
|
||||
do{
|
||||
sy = Math.floor(Math.random() * gridy);
|
||||
sx = Math.floor(Math.random() * gridx/2)*2+sy%2;
|
||||
} while( player[sy][sx][0]>100 );
|
||||
}
|
||||
if (player[sy][sx][0] < 100) {
|
||||
/* Hit something
|
||||
*/
|
||||
setImage(sy,sx,103,false);
|
||||
var shipno = player[sy][sx][1];
|
||||
if ( --playersships[shipno][1] == 0 ) {
|
||||
sinkShip(player,shipno,false);
|
||||
alert("I sank your "+shiptypes[playersships[shipno][0]][0]+"!");
|
||||
if ( --playerlives == 0 ) {
|
||||
knowYourEnemy();
|
||||
alert("I win! Press the Refresh button on\n"+
|
||||
"your browser to play another game.");
|
||||
playflag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Missed
|
||||
*/
|
||||
setImage(sy,sx,102,false);
|
||||
}
|
||||
}
|
||||
|
||||
/* When whole ship is hit, show it using changed graphics
|
||||
*/
|
||||
function sinkShip(grid,shipno,ispc) {
|
||||
var y,x;
|
||||
for (y=0;y<gridx;++y) {
|
||||
for (x=0;x<gridx;++x) {
|
||||
if ( grid[y][x][1] == shipno )
|
||||
if (ispc) setImage(y,x,computer[y][x][2],true);
|
||||
else setImage(y,x,player[y][x][2],false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Show location of all the computers ships - when player has lost
|
||||
*/
|
||||
function knowYourEnemy() {
|
||||
var y,x;
|
||||
for (y=0;y<gridx;++y) {
|
||||
for (x=0;x<gridx;++x) {
|
||||
if ( computer[y][x][0] == 103 )
|
||||
setImage(y,x,computer[y][x][2],true);
|
||||
else if ( computer[y][x][0] < 100 )
|
||||
setImage(y,x,computer[y][x][0],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Show how many ships computer has left
|
||||
*/
|
||||
function updateStatus() {
|
||||
var f=false,i,s = "Computer has ";
|
||||
for (i=0;i<computersships.length;++i) {
|
||||
if (computersships[i][1] > 0) {
|
||||
if (f) s=s+", "; else f=true;
|
||||
s = s + shiptypes[computersships[i][0]][0];
|
||||
}
|
||||
}
|
||||
if (!f) s = s + "nothing left, thanks to you!";
|
||||
statusmsg = s;
|
||||
window.status = statusmsg;
|
||||
}
|
||||
function setStatus() {
|
||||
window.status = statusmsg;
|
||||
}
|
||||
/* Start the game!
|
||||
*/
|
||||
imagePreload();
|
||||
player = setupPlayer(false);
|
||||
computer = setupPlayer(true);
|
||||
document.write("<center><table><tr><td align=center><p class='heading'>COMPUTER'S FLEET</p></td>"+
|
||||
"<td align=center><p class='heading'>PLAYER'S FLEET</p></td></tr><tr><td>");
|
||||
showGrid(true);
|
||||
document.write("</td><td>");
|
||||
showGrid(false);
|
||||
document.write("</td></tr></table></center>");
|
||||
updateStatus();
|
||||
setInterval("setStatus();", 500);
|
||||
</script>
|
||||
<!-- End -->
|
||||
|
||||
<p class="intro">"...We have located the enemy fleet under the command of Admiral Kompüter,
|
||||
but do not yet have visual contact. We suggest the best course of action is to fire
|
||||
at random into their vicinity and listen for the impact of the shells...</p>
|
||||
<p class="intro">...Our intelligence sources indicate the composition of the enemy fleet is the same
|
||||
as our own, and has likewise been forced to resort to the same tactics as ourselves. In accordance with
|
||||
the rules of war, fire will be exchanged one shell at a time and vessels lost will be announced
|
||||
immediately...</p>
|
||||
<p class="intro">...As per your orders you have been placed directly in command of the fleet's guns. Select the target
|
||||
location by clicking in the left-hand grid above. The right hand grid shows the status of our own fleet.
|
||||
Information as to the remaining strength of the enemy will be relayed directly to your status bar...</p>
|
||||
<p class="intro">...We believe this battle will not be over until one or other fleet is sunk in it's entirety. Our gunners
|
||||
await your commands. We're counting on you, Sir..."</p>
|
||||
|
||||
<!-- STEP THREE: Save the battleship images into your web site directory
|
||||
|
||||
You can get the zip file by going to
|
||||
|
||||
http://javascript.internet.com/img/battleship/battleship.zip
|
||||
|
||||
then unzip the images and upload to your site. -->
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
BIN
games/blackchecker.gif
Normal file
After Width: | Height: | Size: 981 B |
BIN
games/clearness.gif
Normal file
After Width: | Height: | Size: 886 B |
@@ -1,355 +1,355 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Connect 4</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Connect-4</h1><br><hr><br>
|
||||
<!-- SIX STEPS TO INSTALL CONNECT 4:
|
||||
|
||||
1. Copy the coding into your Connect 4 Opener page
|
||||
2. Create a new document, save it as connect-4.html
|
||||
3. Paste the next code into HEAD of your HTML document
|
||||
4. Add the onLoad event handler into the BODY tag
|
||||
5. Put the last coding into the BODY of your HTML document
|
||||
6. Be sure to upload all the game images to your site -->
|
||||
|
||||
<!-- STEP ONE: Paste this code into your opener page -->
|
||||
|
||||
|
||||
<!-- STEP TWO: Create a new document, save it as connect-4.html -->
|
||||
|
||||
<!-- STEP THREE: Put this in the HEAD of the connect-4.html page -->
|
||||
|
||||
<HEAD>
|
||||
|
||||
<STYLE TYPE="text/css">
|
||||
BODY{background-color: Cornsilk}
|
||||
IMG {border: 0}
|
||||
A:visited {color: blue}
|
||||
FONT.score {color: blue; font-size: large}
|
||||
FONT.redscore {color: red}
|
||||
FONT.blackscore {color: black}
|
||||
</STYLE>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
var vals = new Array()
|
||||
var gameActive = 0
|
||||
function rePlay() {
|
||||
if (gameActive == 1) {
|
||||
document.formo.redScoreBoard.value = redScore + ""
|
||||
document.formo.blackScoreBoard.value = blackScore + ""
|
||||
clearBoard()
|
||||
}
|
||||
for (var c1 = 0; c1 <= 6; c1++) {
|
||||
vals[c1] = 0
|
||||
}
|
||||
}
|
||||
|
||||
var redSpot = new Image()
|
||||
var blackSpot = new Image()
|
||||
var emptySpot = new Image()
|
||||
var emptyChecker = new Image()
|
||||
var redChecker = new Image()
|
||||
var blackChecker = new Image()
|
||||
|
||||
redSpot.src = "fillred.gif"
|
||||
blackSpot.src = "fillblack.gif"
|
||||
emptySpot.src = "fillempty.gif"
|
||||
emptyChecker.src = "clearness.gif"
|
||||
redChecker.src = "redchecker.gif"
|
||||
blackChecker.src = "blackchecker.gif"
|
||||
|
||||
var whosTurn = "red"
|
||||
var whosTurnSpot = new Image()
|
||||
var whosTurnChecker = new Image()
|
||||
whosTurnSpot.src = redSpot.src
|
||||
whosTurnChecker.src = redChecker.src
|
||||
|
||||
function clearBoard() {
|
||||
for (var a = 7; a <= 48; a++) {
|
||||
document.images[a].src = emptySpot.src
|
||||
}
|
||||
}
|
||||
function placeTop(picToPlace) {
|
||||
if (gameActive == 1) {
|
||||
document.images[picToPlace].src = whosTurnChecker.src
|
||||
}
|
||||
}
|
||||
function unPlaceTop(picToUnplace) {
|
||||
if (gameActive == 1) {
|
||||
document.images[picToUnplace].src = emptyChecker.src
|
||||
}
|
||||
}
|
||||
var placeLoc
|
||||
function dropIt(whichRow) {
|
||||
if (gameActive == 1) {
|
||||
//alert("func dropIt")
|
||||
placeLoc = (7 - vals[whichRow]) * 7 -7 + whichRow
|
||||
if (vals[whichRow] < 6) {
|
||||
document.images[placeLoc].src = whosTurnSpot.src
|
||||
vals[whichRow] = vals[whichRow] + 1
|
||||
checkForWinner(whosTurn)
|
||||
switchTurns()
|
||||
placeTop(whichRow)
|
||||
}
|
||||
}
|
||||
}
|
||||
function whoGoesFirst() {
|
||||
whosTurn = whosFirst
|
||||
switchTurns()
|
||||
if (whosFirst == "red") {
|
||||
whosFirst = "black"
|
||||
} else {
|
||||
whosFirst = "red"
|
||||
}
|
||||
}
|
||||
function switchTurns() {
|
||||
if (gameActive == 1) {
|
||||
//alert("func switchTurns")
|
||||
if (whosTurn == "red") {
|
||||
whosTurn = "black"
|
||||
whosTurnSpot.src = blackSpot.src
|
||||
whosTurnChecker.src = blackChecker.src
|
||||
document.formo.texter.value = blackPlayer + "'s turn."
|
||||
} else {
|
||||
whosTurn = "red"
|
||||
whosTurnSpot.src = redSpot.src
|
||||
whosTurnChecker.src = redChecker.src
|
||||
document.formo.texter.value = redPlayer + "'s turn."
|
||||
}
|
||||
}
|
||||
}
|
||||
var redPlayer
|
||||
var blackPlayer
|
||||
var whosFirst
|
||||
function askForNames() {
|
||||
if (gameActive == 1) {
|
||||
//alert("func askForNames")
|
||||
redScore = 0
|
||||
blackScore = 0
|
||||
document.formo.redScoreBoard.value = redScore + ""
|
||||
document.formo.blackScoreBoard.value = blackScore + ""
|
||||
matchMade = 1
|
||||
redPlayer = prompt("What is the name of the red player?", "")
|
||||
blackPlayer = prompt("What is the name of the black player?", "")
|
||||
whosFirst = prompt("Which player is going first?", "")
|
||||
if (redPlayer == null || redPlayer == "") {
|
||||
redPlayer = "Red Player"
|
||||
}
|
||||
if (blackPlayer == null || blackPlayer == "") {
|
||||
blackPlayer = "Black Player"
|
||||
}
|
||||
if (whosFirst == "r" || whosFirst == "red" || whosFirst == redPlayer) {
|
||||
document.formo.texter.value = redPlayer + "'s turn."
|
||||
whosTurn = "black"
|
||||
switchTurns()
|
||||
whosFirst = "red"
|
||||
} else {
|
||||
document.formo.texter.value = blackPlayer + "'s turn."
|
||||
whosTurn = "red"
|
||||
switchTurns()
|
||||
whosFirst = "black"
|
||||
}
|
||||
}
|
||||
}
|
||||
var lookForSrc
|
||||
var redScore = 0
|
||||
var blackScore = 0
|
||||
var someOneWon
|
||||
var rowsFull = 0
|
||||
function checkForWinner(colorToCheck) {
|
||||
if (gameActive == 1) {
|
||||
//alert("func checkForWinner")
|
||||
someOneWon = 0
|
||||
if (colorToCheck == "red") {
|
||||
lookForSrc = redSpot.src
|
||||
}
|
||||
if (colorToCheck == "black") {
|
||||
lookForSrc = blackSpot.src
|
||||
}
|
||||
rowsFull = 0
|
||||
//alert("LookForSrc = " + lookForSrc + ". And document.images[7].src = " + document.images[7].src)
|
||||
for (var counter = 7; counter <= 48; counter++) {
|
||||
if (document.images[counter].src == lookForSrc) {
|
||||
if ((counter + 3 <= 48
|
||||
&& counter != 11 && counter != 12 && counter != 13
|
||||
&& counter != 18 && counter != 19 && counter != 20
|
||||
&& counter != 25 && counter != 26 && counter != 27
|
||||
&& counter != 32 && counter != 33 && counter != 34
|
||||
&& counter != 39 && counter != 40 && counter != 41
|
||||
&& document.images[counter + 1].src == lookForSrc
|
||||
&& document.images[counter + 2].src == lookForSrc
|
||||
&& document.images[counter + 3].src == lookForSrc)
|
||||
|| (counter + 3 * 7 <= 48
|
||||
&& document.images[counter + 7].src == lookForSrc
|
||||
&& document.images[counter + 7*2].src == lookForSrc
|
||||
&& document.images[counter + 7*3].src == lookForSrc)
|
||||
|| (counter + 3 * 7 <= 48
|
||||
&& counter != 11 && counter != 12 && counter != 13
|
||||
&& counter != 18 && counter != 19 && counter != 20
|
||||
&& counter != 25 && counter != 26 && counter != 27
|
||||
&& document.images[counter + 7 + 1].src == lookForSrc
|
||||
&& document.images[counter + 7*2 + 2].src == lookForSrc
|
||||
&& document.images[counter + 7*3 + 3].src == lookForSrc)
|
||||
|| (counter - 3 * 7 >= 7
|
||||
&& counter != 32 && counter != 33 && counter != 34
|
||||
&& counter != 39 && counter != 40 && counter != 41
|
||||
&& counter != 46 && counter != 47 && counter != 48
|
||||
&& document.images[counter - 7 + 1].src == lookForSrc
|
||||
&& document.images[counter - 7*2 + 2].src == lookForSrc
|
||||
&& document.images[counter - 7*3 + 3].src == lookForSrc)) {
|
||||
for (var c2 = 0; c2<= 6; c2++) {
|
||||
unPlaceTop(c2)
|
||||
}
|
||||
if (colorToCheck == "red") {
|
||||
alert(redPlayer + " wins.")
|
||||
redScore += 1
|
||||
} else if (colorToCheck == "black") {
|
||||
alert(blackPlayer + " wins.")
|
||||
blackScore += 1
|
||||
}
|
||||
gameActive = 0
|
||||
someOneWon = 1
|
||||
counter = 49
|
||||
document.formo.redScoreBoard.value = redScore + ""
|
||||
document.formo.blackScoreBoard.value = blackScore + ""
|
||||
}
|
||||
}
|
||||
}
|
||||
if (someOneWon != 1) {
|
||||
for (var poo = 0; poo <= 6; poo++) {
|
||||
if (vals[poo] == 6) {
|
||||
rowsFull += 1
|
||||
}
|
||||
}
|
||||
if (rowsFull == 7) {
|
||||
for (var c3 = 0; c3<= 6; c3++) {
|
||||
unPlaceTop(c3)
|
||||
}
|
||||
gameActive = 0
|
||||
alert("This game has reached a draw.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var matchMade = 0
|
||||
function newGame() {
|
||||
if (matchMade == 1) {
|
||||
gameActive = 1
|
||||
rePlay()
|
||||
whoGoesFirst()
|
||||
}
|
||||
}
|
||||
function newMatchUp() {
|
||||
if (confirm("Are you sure you want to Start a new match?")) {
|
||||
gameActive = 1
|
||||
rePlay()
|
||||
askForNames()
|
||||
}
|
||||
}
|
||||
function setMsg(whatToSay) {
|
||||
window.status = whatToSay
|
||||
return true
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
</HEAD>
|
||||
|
||||
<!-- STEP FOUR: Put this onLoad event handler into the BODY tag -->
|
||||
|
||||
<BODY OnLoad="rePlay()">
|
||||
|
||||
<!-- STEP FIVE: Copy this code into the BODY of connect-4.html -->
|
||||
|
||||
<center>
|
||||
<form name="formo">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td align=right>Click to start --> <input type="button" name="startButton" value="New Match" onClick="newMatchUp()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td align=right><input type="button" name="reStartButton" value="New Game" onClick="newGame()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td align=right><input type="text" name="texter" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td valign="bottom" align=right><font class="score">SCORE:</font><br><font class="redscore">Red</font> <font class="blackscore">Black</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td valign="top" align=right><input type="text" name="redScoreBoard" size="3"><input type ="text" name="blackScoreBoard" size="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<!-- STEP FOUR: Be sure to upload all the game images to your site -->
|
||||
|
||||
<!-- http://javascript.internet.com/img/connect-4/connect-4.zip -->
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
|
||||
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
|
||||
<!-- Script Size: 17.21 KB -->
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<title>Connect 4</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Connect-4</h1><br><hr><br>
|
||||
<!-- SIX STEPS TO INSTALL CONNECT 4:
|
||||
|
||||
1. Copy the coding into your Connect 4 Opener page
|
||||
2. Create a new document, save it as connect-4.html
|
||||
3. Paste the next code into HEAD of your HTML document
|
||||
4. Add the onLoad event handler into the BODY tag
|
||||
5. Put the last coding into the BODY of your HTML document
|
||||
6. Be sure to upload all the game images to your site -->
|
||||
|
||||
<!-- STEP ONE: Paste this code into your opener page -->
|
||||
|
||||
|
||||
<!-- STEP TWO: Create a new document, save it as connect-4.html -->
|
||||
|
||||
<!-- STEP THREE: Put this in the HEAD of the connect-4.html page -->
|
||||
|
||||
<HEAD>
|
||||
|
||||
<STYLE TYPE="text/css">
|
||||
BODY{background-color: Cornsilk}
|
||||
IMG {border: 0}
|
||||
A:visited {color: blue}
|
||||
FONT.score {color: blue; font-size: large}
|
||||
FONT.redscore {color: red}
|
||||
FONT.blackscore {color: black}
|
||||
</STYLE>
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
|
||||
<!-- Begin
|
||||
var vals = new Array()
|
||||
var gameActive = 0
|
||||
function rePlay() {
|
||||
if (gameActive == 1) {
|
||||
document.formo.redScoreBoard.value = redScore + ""
|
||||
document.formo.blackScoreBoard.value = blackScore + ""
|
||||
clearBoard()
|
||||
}
|
||||
for (var c1 = 0; c1 <= 6; c1++) {
|
||||
vals[c1] = 0
|
||||
}
|
||||
}
|
||||
|
||||
var redSpot = new Image()
|
||||
var blackSpot = new Image()
|
||||
var emptySpot = new Image()
|
||||
var emptyChecker = new Image()
|
||||
var redChecker = new Image()
|
||||
var blackChecker = new Image()
|
||||
|
||||
redSpot.src = "fillred.gif"
|
||||
blackSpot.src = "fillblack.gif"
|
||||
emptySpot.src = "fillempty.gif"
|
||||
emptyChecker.src = "clearness.gif"
|
||||
redChecker.src = "redchecker.gif"
|
||||
blackChecker.src = "blackchecker.gif"
|
||||
|
||||
var whosTurn = "red"
|
||||
var whosTurnSpot = new Image()
|
||||
var whosTurnChecker = new Image()
|
||||
whosTurnSpot.src = redSpot.src
|
||||
whosTurnChecker.src = redChecker.src
|
||||
|
||||
function clearBoard() {
|
||||
for (var a = 7; a <= 48; a++) {
|
||||
document.images[a].src = emptySpot.src
|
||||
}
|
||||
}
|
||||
function placeTop(picToPlace) {
|
||||
if (gameActive == 1) {
|
||||
document.images[picToPlace].src = whosTurnChecker.src
|
||||
}
|
||||
}
|
||||
function unPlaceTop(picToUnplace) {
|
||||
if (gameActive == 1) {
|
||||
document.images[picToUnplace].src = emptyChecker.src
|
||||
}
|
||||
}
|
||||
var placeLoc
|
||||
function dropIt(whichRow) {
|
||||
if (gameActive == 1) {
|
||||
//alert("func dropIt")
|
||||
placeLoc = (7 - vals[whichRow]) * 7 -7 + whichRow
|
||||
if (vals[whichRow] < 6) {
|
||||
document.images[placeLoc].src = whosTurnSpot.src
|
||||
vals[whichRow] = vals[whichRow] + 1
|
||||
checkForWinner(whosTurn)
|
||||
switchTurns()
|
||||
placeTop(whichRow)
|
||||
}
|
||||
}
|
||||
}
|
||||
function whoGoesFirst() {
|
||||
whosTurn = whosFirst
|
||||
switchTurns()
|
||||
if (whosFirst == "red") {
|
||||
whosFirst = "black"
|
||||
} else {
|
||||
whosFirst = "red"
|
||||
}
|
||||
}
|
||||
function switchTurns() {
|
||||
if (gameActive == 1) {
|
||||
//alert("func switchTurns")
|
||||
if (whosTurn == "red") {
|
||||
whosTurn = "black"
|
||||
whosTurnSpot.src = blackSpot.src
|
||||
whosTurnChecker.src = blackChecker.src
|
||||
document.formo.texter.value = blackPlayer + "'s turn."
|
||||
} else {
|
||||
whosTurn = "red"
|
||||
whosTurnSpot.src = redSpot.src
|
||||
whosTurnChecker.src = redChecker.src
|
||||
document.formo.texter.value = redPlayer + "'s turn."
|
||||
}
|
||||
}
|
||||
}
|
||||
var redPlayer
|
||||
var blackPlayer
|
||||
var whosFirst
|
||||
function askForNames() {
|
||||
if (gameActive == 1) {
|
||||
//alert("func askForNames")
|
||||
redScore = 0
|
||||
blackScore = 0
|
||||
document.formo.redScoreBoard.value = redScore + ""
|
||||
document.formo.blackScoreBoard.value = blackScore + ""
|
||||
matchMade = 1
|
||||
redPlayer = prompt("What is the name of the red player?", "")
|
||||
blackPlayer = prompt("What is the name of the black player?", "")
|
||||
whosFirst = prompt("Which player is going first?", "")
|
||||
if (redPlayer == null || redPlayer == "") {
|
||||
redPlayer = "Red Player"
|
||||
}
|
||||
if (blackPlayer == null || blackPlayer == "") {
|
||||
blackPlayer = "Black Player"
|
||||
}
|
||||
if (whosFirst == "r" || whosFirst == "red" || whosFirst == redPlayer) {
|
||||
document.formo.texter.value = redPlayer + "'s turn."
|
||||
whosTurn = "black"
|
||||
switchTurns()
|
||||
whosFirst = "red"
|
||||
} else {
|
||||
document.formo.texter.value = blackPlayer + "'s turn."
|
||||
whosTurn = "red"
|
||||
switchTurns()
|
||||
whosFirst = "black"
|
||||
}
|
||||
}
|
||||
}
|
||||
var lookForSrc
|
||||
var redScore = 0
|
||||
var blackScore = 0
|
||||
var someOneWon
|
||||
var rowsFull = 0
|
||||
function checkForWinner(colorToCheck) {
|
||||
if (gameActive == 1) {
|
||||
//alert("func checkForWinner")
|
||||
someOneWon = 0
|
||||
if (colorToCheck == "red") {
|
||||
lookForSrc = redSpot.src
|
||||
}
|
||||
if (colorToCheck == "black") {
|
||||
lookForSrc = blackSpot.src
|
||||
}
|
||||
rowsFull = 0
|
||||
//alert("LookForSrc = " + lookForSrc + ". And document.images[7].src = " + document.images[7].src)
|
||||
for (var counter = 7; counter <= 48; counter++) {
|
||||
if (document.images[counter].src == lookForSrc) {
|
||||
if ((counter + 3 <= 48
|
||||
&& counter != 11 && counter != 12 && counter != 13
|
||||
&& counter != 18 && counter != 19 && counter != 20
|
||||
&& counter != 25 && counter != 26 && counter != 27
|
||||
&& counter != 32 && counter != 33 && counter != 34
|
||||
&& counter != 39 && counter != 40 && counter != 41
|
||||
&& document.images[counter + 1].src == lookForSrc
|
||||
&& document.images[counter + 2].src == lookForSrc
|
||||
&& document.images[counter + 3].src == lookForSrc)
|
||||
|| (counter + 3 * 7 <= 48
|
||||
&& document.images[counter + 7].src == lookForSrc
|
||||
&& document.images[counter + 7*2].src == lookForSrc
|
||||
&& document.images[counter + 7*3].src == lookForSrc)
|
||||
|| (counter + 3 * 7 <= 48
|
||||
&& counter != 11 && counter != 12 && counter != 13
|
||||
&& counter != 18 && counter != 19 && counter != 20
|
||||
&& counter != 25 && counter != 26 && counter != 27
|
||||
&& document.images[counter + 7 + 1].src == lookForSrc
|
||||
&& document.images[counter + 7*2 + 2].src == lookForSrc
|
||||
&& document.images[counter + 7*3 + 3].src == lookForSrc)
|
||||
|| (counter - 3 * 7 >= 7
|
||||
&& counter != 32 && counter != 33 && counter != 34
|
||||
&& counter != 39 && counter != 40 && counter != 41
|
||||
&& counter != 46 && counter != 47 && counter != 48
|
||||
&& document.images[counter - 7 + 1].src == lookForSrc
|
||||
&& document.images[counter - 7*2 + 2].src == lookForSrc
|
||||
&& document.images[counter - 7*3 + 3].src == lookForSrc)) {
|
||||
for (var c2 = 0; c2<= 6; c2++) {
|
||||
unPlaceTop(c2)
|
||||
}
|
||||
if (colorToCheck == "red") {
|
||||
alert(redPlayer + " wins.")
|
||||
redScore += 1
|
||||
} else if (colorToCheck == "black") {
|
||||
alert(blackPlayer + " wins.")
|
||||
blackScore += 1
|
||||
}
|
||||
gameActive = 0
|
||||
someOneWon = 1
|
||||
counter = 49
|
||||
document.formo.redScoreBoard.value = redScore + ""
|
||||
document.formo.blackScoreBoard.value = blackScore + ""
|
||||
}
|
||||
}
|
||||
}
|
||||
if (someOneWon != 1) {
|
||||
for (var poo = 0; poo <= 6; poo++) {
|
||||
if (vals[poo] == 6) {
|
||||
rowsFull += 1
|
||||
}
|
||||
}
|
||||
if (rowsFull == 7) {
|
||||
for (var c3 = 0; c3<= 6; c3++) {
|
||||
unPlaceTop(c3)
|
||||
}
|
||||
gameActive = 0
|
||||
alert("This game has reached a draw.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var matchMade = 0
|
||||
function newGame() {
|
||||
if (matchMade == 1) {
|
||||
gameActive = 1
|
||||
rePlay()
|
||||
whoGoesFirst()
|
||||
}
|
||||
}
|
||||
function newMatchUp() {
|
||||
if (confirm("Are you sure you want to Start a new match?")) {
|
||||
gameActive = 1
|
||||
rePlay()
|
||||
askForNames()
|
||||
}
|
||||
}
|
||||
function setMsg(whatToSay) {
|
||||
window.status = whatToSay
|
||||
return true
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
</HEAD>
|
||||
|
||||
<!-- STEP FOUR: Put this onLoad event handler into the BODY tag -->
|
||||
|
||||
<BODY OnLoad="rePlay()">
|
||||
|
||||
<!-- STEP FIVE: Copy this code into the BODY of connect-4.html -->
|
||||
|
||||
<center>
|
||||
<form name="formo">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="clearness.gif" height="50" width="50"></a></td>
|
||||
<td align=right>Click to start --> <input type="button" name="startButton" value="New Match" onClick="newMatchUp()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td align=right><input type="button" name="reStartButton" value="New Game" onClick="newGame()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td align=right><input type="text" name="texter" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td valign="bottom" align=right><font class="score">SCORE:</font><br><font class="redscore">Red</font> <font class="blackscore">Black</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td valign="top" align=right><input type="text" name="redScoreBoard" size="3"><input type ="text" name="blackScoreBoard" size="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="javascript:void dropIt(0)" onMouseOver="placeTop(0); setMsg(''); return true" onMouseOut="unPlaceTop(0)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(1)" onMouseOver="placeTop(1); setMsg(''); return true" onMouseOut="unPlaceTop(1)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(2)" onMouseOver="placeTop(2); setMsg(''); return true" onMouseOut="unPlaceTop(2)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(3)" onMouseOver="placeTop(3); setMsg(''); return true" onMouseOut="unPlaceTop(3)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(4)" onMouseOver="placeTop(4); setMsg(''); return true" onMouseOut="unPlaceTop(4)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(5)" onMouseOver="placeTop(5); setMsg(''); return true" onMouseOut="unPlaceTop(5)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
<td><a href="javascript:void dropIt(6)" onMouseOver="placeTop(6); setMsg(''); return true" onMouseOut="unPlaceTop(6)"><img border="0" src="fillempty.gif" height="50" width="50"></A></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<!-- STEP FOUR: Be sure to upload all the game images to your site -->
|
||||
|
||||
<!-- http://javascript.internet.com/img/connect-4/connect-4.zip -->
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
|
||||
by <a href="#">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
|
||||
<!-- Script Size: 17.21 KB -->
|
||||
</body>
|
||||
</html>
|
@@ -1,8 +1,8 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Crossword Puzzle</TITLE>
|
||||
</HEAD>
|
||||
<BODY bgcolor="Cornsilk">
|
||||
<CENTER><IMG SRC="cwkit.JPG" ALT="Crossword Construction Kit 97 Puzzle"></CENTER><P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Crossword Puzzle</TITLE>
|
||||
</HEAD>
|
||||
<BODY bgcolor="Cornsilk">
|
||||
<CENTER><IMG SRC="cwkit.JPG" ALT="Crossword Construction Kit 97 Puzzle"></CENTER><P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
BIN
games/fillblack.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
games/fillempty.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
games/fillred.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
@@ -1,49 +1,49 @@
|
||||
<html>
|
||||
<head>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!-- Original: Ronnie T. Moore -->
|
||||
<!-- Web Site: The JavaScript Source -->
|
||||
<!-- Based on code by: Michael Carpenter -->
|
||||
<!-- URL: http://www.michaelcarpenter.net -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
var answers = new Array(
|
||||
"Without a doubt",
|
||||
"Yes!",
|
||||
"Probably so",
|
||||
"It isn't likely",
|
||||
"it's possible",
|
||||
"Absolutely",
|
||||
"Not a chance",
|
||||
"Ask again",
|
||||
"No",
|
||||
"I doubt it",
|
||||
"No Way"
|
||||
);
|
||||
function fortune() {
|
||||
num = Math.round( (answers.length - 1) * Math.random());
|
||||
return answers[num];
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
<title>Fortune Teller</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Fortune Teller</h1><br><hr><br>
|
||||
<center>
|
||||
<form>
|
||||
Your question: <input type=text name=question size=40>
|
||||
<input type=button name=ask value="Ask" onClick="if (this.form.question.value!='') this.form.answer.value = fortune();"><br>
|
||||
Your fortune teller says: <input type=text name=answer size=40>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
|
||||
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Original: Ronnie T. Moore -->
|
||||
<!-- Web Site: The JavaScript Source -->
|
||||
<!-- Based on code by: Michael Carpenter -->
|
||||
<!-- URL: http://www.michaelcarpenter.net -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin -->
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
var answers = new Array(
|
||||
"Without a doubt",
|
||||
"Yes!",
|
||||
"Probably so",
|
||||
"It isn't likely",
|
||||
"it's possible",
|
||||
"Absolutely",
|
||||
"Not a chance",
|
||||
"Ask again",
|
||||
"No",
|
||||
"I doubt it",
|
||||
"No Way"
|
||||
);
|
||||
function fortune() {
|
||||
num = Math.round( (answers.length - 1) * Math.random());
|
||||
return answers[num];
|
||||
}
|
||||
</script>
|
||||
<!-- End -->
|
||||
<title>Fortune Teller</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Fortune Teller</h1><br><hr><br>
|
||||
<center>
|
||||
<form>
|
||||
Your question: <input type=text name=question size=40>
|
||||
<input type=button name=ask value="Ask" onClick="if (this.form.question.value!='') this.form.answer.value = fortune();"><br>
|
||||
Your fortune teller says: <input type=text name=answer size=40>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
|
||||
by <a href="#">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,244 +1,243 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Hangman</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Hangman</h1><br><hr><br>
|
||||
<center>
|
||||
<table border=8 bgcolor=white width=60% cellspacing=0>
|
||||
<tr><td>
|
||||
<center>
|
||||
<h2>Hangman!</h2><br>
|
||||
<b><h3><font color=red>Topic:</font>
|
||||
Presidents of The United States</h3></b>
|
||||
<hr><br>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
|
||||
<!-- Original: Rick Glusick -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
function getCookie (name) {
|
||||
var dcookie = document.cookie;
|
||||
var cname = name + "=";
|
||||
var clen = dcookie.length;
|
||||
var cbegin = 0;
|
||||
while (cbegin < clen) {
|
||||
var vbegin = cbegin + cname.length;
|
||||
if (dcookie.substring(cbegin, vbegin) == cname) {
|
||||
var vend = dcookie.indexOf (";", vbegin);
|
||||
if (vend == -1) vend = clen;
|
||||
return unescape(dcookie.substring(vbegin, vend));
|
||||
}
|
||||
cbegin = dcookie.indexOf(" ", cbegin) + 1;
|
||||
if (cbegin == 0) break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function setCookie (name, value, expires) {
|
||||
if (!expires) expires = new Date();
|
||||
document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() + "; path=/";
|
||||
}
|
||||
function delCookie (name) {
|
||||
var expireNow = new Date();
|
||||
document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/";
|
||||
}
|
||||
var Alphabet = new initAlphaArray()
|
||||
var NumOfWords = 42;
|
||||
var SaveData = "";
|
||||
var ImageNum = "";
|
||||
var LettersSelected = "";
|
||||
var RandomWord = "";
|
||||
var DisplayWord = "";
|
||||
var position = 0;
|
||||
var word = new WordList();
|
||||
var expdate = new Date();
|
||||
var RandomNumber = (expdate.getSeconds())%NumOfWords;
|
||||
function initAlphaArray() {
|
||||
this.length = 26
|
||||
this[0] = "A"
|
||||
this[1] = "B"
|
||||
this[2] = "C"
|
||||
this[3] = "D"
|
||||
this[4] = "E"
|
||||
this[5] = "F"
|
||||
this[6] = "G"
|
||||
this[7] = "H"
|
||||
this[8] = "I"
|
||||
this[9] = "J"
|
||||
this[10] = "K"
|
||||
this[11] = "L"
|
||||
this[12] = "M"
|
||||
this[13] = "N"
|
||||
this[14] = "O"
|
||||
this[15] = "P"
|
||||
this[16] = "Q"
|
||||
this[17] = "R"
|
||||
this[18] = "S"
|
||||
this[19] = "T"
|
||||
this[20] = "U"
|
||||
this[21] = "V"
|
||||
this[22] = "W"
|
||||
this[23] = "X"
|
||||
this[24] = "Y"
|
||||
this[25] = "Z"
|
||||
}
|
||||
function WordList() {
|
||||
this.length = NumOfWords;
|
||||
this[0] = "GEORGE WASHINGTON";
|
||||
this[1] = "JOHN ADAMS";
|
||||
this[2] = "THOMAS JEFFERSON";
|
||||
this[3] = "JAMES MADISON";
|
||||
this[4] = "JAMES MONROE";
|
||||
this[5] = "JOHN QUINCY ADAMS";
|
||||
this[6] = "ANDREW JACKSON";
|
||||
this[7] = "MARTIN VAN BUREN";
|
||||
this[8] = "WILLIAM HENRY HARRISON";
|
||||
this[9] = "JOHN TYLER";
|
||||
this[10] = "JAMES POLK";
|
||||
this[11] = "ZACHARY TAYLOR";
|
||||
this[12] = "MILLARD FILLMORE";
|
||||
this[13] = "FRANKLIN PIERCE";
|
||||
this[14] = "JAMES BUCHANAN";
|
||||
this[15] = "ABRAHAM LINCOLN";
|
||||
this[16] = "ANDREW JOHNSON";
|
||||
this[17] = "ULYSSES GRANT";
|
||||
this[18] = "RUTHERFORD HAYES";
|
||||
this[19] = "JAMES GARFIELD";
|
||||
this[20] = "CHESTER ARTHUR";
|
||||
this[21] = "GROVER CLEVELAND";
|
||||
this[22] = "BENJAMIN HARRISON";
|
||||
this[23] = "GROVER CLEVELAND";
|
||||
this[24] = "WILLIAM MCKINLEY";
|
||||
this[25] = "THEODORE ROOSEVELT";
|
||||
this[26] = "WILLIAM HOWARD TAFT";
|
||||
this[27] = "WOODROW WILSON";
|
||||
this[28] = "WARREN HARDING";
|
||||
this[29] = "CALVIN COOLIDGE";
|
||||
this[30] = "HERBERT HOOVER";
|
||||
this[31] = "FRANKLIN ROOSEVELT";
|
||||
this[32] = "HARRY TRUMAN";
|
||||
this[33] = "DWIGHT EISENHOWER";
|
||||
this[34] = "JOHN KENNEDY";
|
||||
this[35] = "LYNDON JOHNSON";
|
||||
this[36] = "RICHARD NIXON";
|
||||
this[37] = "GERALD FORD";
|
||||
this[38] = "JIMMY CARTER";
|
||||
this[39] = "RONALD REAGAN";
|
||||
this[40] = "GEORGE BUSH";
|
||||
this[41] = "BILL CLINTON";
|
||||
}
|
||||
function availableLetters(i) {
|
||||
if (LettersSelected.charAt(i)==Alphabet[i])
|
||||
document.write('<TD ALIGN=CENTER VALIGN=CENTER WIDTH=20 HEIGHT=12>' +
|
||||
'<B><A HREF="javascript:LoadNextPage('+i+',\''+Alphabet[i]+
|
||||
'\')">'+Alphabet[i]+'</A></B></TD>');
|
||||
else
|
||||
document.write('<TD ALIGN=CENTER VALIGN=CENTER WIDTH=20 HEIGHT=12> </TD>');
|
||||
}
|
||||
function LoadNextPage(selected,letter) {
|
||||
var j=0;
|
||||
var HoldLettersSelected = LettersSelected;
|
||||
LettersSelected = "";
|
||||
if (selected == 0) {
|
||||
for (j=1; j<=25; j++) {
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
LettersSelected = "^" + LettersSelected;
|
||||
}
|
||||
else if (selected == 25) {
|
||||
for (j=0; j<=24; j++) {
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
LettersSelected += "^";
|
||||
}
|
||||
else {
|
||||
for (j=0; j<selected; j++)
|
||||
{
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
LettersSelected += "^";
|
||||
for (j=selected+1; j<=25; j++) {
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SaveData = ImageNum + LettersSelected + RandomWord + "*";
|
||||
setCookie("_HangMan", SaveData, expdate);
|
||||
history.go(0);
|
||||
}
|
||||
|
||||
// Sets a cookie that will expire in 10 days
|
||||
|
||||
expdate.setTime (expdate.getTime() + (1000*60*60*24*10));
|
||||
if(getCookie("_HangMan") == null)
|
||||
{
|
||||
ImageNum = "A";
|
||||
LettersSelected = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
RandomWord = word[RandomNumber];
|
||||
SaveData = ImageNum + LettersSelected + RandomWord + "*";
|
||||
setCookie("_HangMan", SaveData, expdate);
|
||||
}
|
||||
else {
|
||||
SaveData = getCookie("_HangMan");
|
||||
ImageNum = SaveData.charAt(0);
|
||||
for (position=1; position<=26; position++) {
|
||||
LettersSelected += SaveData.charAt(position);
|
||||
}
|
||||
for (position=27; position<SaveData.indexOf("*"); position++) {
|
||||
RandomWord += SaveData.charAt(position);
|
||||
}
|
||||
}
|
||||
DisplayWord = "";
|
||||
for (i=0; i<RandomWord.length; i++) {
|
||||
if (RandomWord.charAt(i) == ' ') {
|
||||
DisplayWord += " ";
|
||||
}
|
||||
else {
|
||||
MatchFound = false;
|
||||
for (j=0; j<=25; j++) {
|
||||
if ((LettersSelected.charAt(j) == "^") && (RandomWord.charAt(i) == Alphabet[j])) {
|
||||
DisplayWord += RandomWord.charAt(i);
|
||||
MatchFound = true;
|
||||
}
|
||||
}
|
||||
if (!MatchFound) DisplayWord += "-";
|
||||
}
|
||||
}
|
||||
if (ImageNum == "J") {
|
||||
document.write('<font color=red size=4>You Lost!<br>Answer: "' + RandomWord + '"</font>');
|
||||
}
|
||||
else if (RandomWord == DisplayWord) {
|
||||
document.write('<font color=red size=8>You Win!</font>');
|
||||
}
|
||||
else {
|
||||
document.write('<table>');
|
||||
document.write('<tr>');
|
||||
for (i=0; i<13; i++) availableLetters(i);
|
||||
document.write('</tr>');
|
||||
document.write('<tr>');
|
||||
for (i=13; i<26; i++) availableLetters(i);
|
||||
document.write('</tr>');
|
||||
document.write('</table>');
|
||||
}
|
||||
document.write('<br>');
|
||||
document.write('<br>');
|
||||
document.write('<font size=9><tt>');
|
||||
document.write(DisplayWord);
|
||||
document.write('</tt></font>');
|
||||
document.write('<form>');
|
||||
document.write('<input type="button" VALUE="New Game"'+
|
||||
'onClick="delCookie(\'_HangMan\');history.go(0);">');
|
||||
document.write('</form>');
|
||||
document.write('</center>');
|
||||
// End -->
|
||||
</SCRIPT>
|
||||
</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hangman</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Hangman</h1><br><hr><br>
|
||||
<center>
|
||||
<table border=8 bgcolor=white width=60% cellspacing=0>
|
||||
<tr><td>
|
||||
<center>
|
||||
<h2>Hangman!</h2><br>
|
||||
<b><h3><font color=red>Topic:</font>
|
||||
Presidents of The United States</h3></b>
|
||||
<hr><br>
|
||||
|
||||
<!-- Original: Rick Glusick -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin -->
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
function getCookie (name) {
|
||||
var dcookie = document.cookie;
|
||||
var cname = name + "=";
|
||||
var clen = dcookie.length;
|
||||
var cbegin = 0;
|
||||
while (cbegin < clen) {
|
||||
var vbegin = cbegin + cname.length;
|
||||
if (dcookie.substring(cbegin, vbegin) == cname) {
|
||||
var vend = dcookie.indexOf (";", vbegin);
|
||||
if (vend == -1) vend = clen;
|
||||
return unescape(dcookie.substring(vbegin, vend));
|
||||
}
|
||||
cbegin = dcookie.indexOf(" ", cbegin) + 1;
|
||||
if (cbegin == 0) break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function setCookie (name, value, expires) {
|
||||
if (!expires) expires = new Date();
|
||||
document.cookie = name + "=" + escape (value) + "; expires=" + expires.toGMTString() + "; path=/";
|
||||
}
|
||||
function delCookie (name) {
|
||||
var expireNow = new Date();
|
||||
document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/";
|
||||
}
|
||||
var Alphabet = new initAlphaArray()
|
||||
var NumOfWords = 42;
|
||||
var SaveData = "";
|
||||
var ImageNum = "";
|
||||
var LettersSelected = "";
|
||||
var RandomWord = "";
|
||||
var DisplayWord = "";
|
||||
var position = 0;
|
||||
var word = new WordList();
|
||||
var expdate = new Date();
|
||||
var RandomNumber = (expdate.getSeconds())%NumOfWords;
|
||||
function initAlphaArray() {
|
||||
this.length = 26
|
||||
this[0] = "A"
|
||||
this[1] = "B"
|
||||
this[2] = "C"
|
||||
this[3] = "D"
|
||||
this[4] = "E"
|
||||
this[5] = "F"
|
||||
this[6] = "G"
|
||||
this[7] = "H"
|
||||
this[8] = "I"
|
||||
this[9] = "J"
|
||||
this[10] = "K"
|
||||
this[11] = "L"
|
||||
this[12] = "M"
|
||||
this[13] = "N"
|
||||
this[14] = "O"
|
||||
this[15] = "P"
|
||||
this[16] = "Q"
|
||||
this[17] = "R"
|
||||
this[18] = "S"
|
||||
this[19] = "T"
|
||||
this[20] = "U"
|
||||
this[21] = "V"
|
||||
this[22] = "W"
|
||||
this[23] = "X"
|
||||
this[24] = "Y"
|
||||
this[25] = "Z"
|
||||
}
|
||||
function WordList() {
|
||||
this.length = NumOfWords;
|
||||
this[0] = "GEORGE WASHINGTON";
|
||||
this[1] = "JOHN ADAMS";
|
||||
this[2] = "THOMAS JEFFERSON";
|
||||
this[3] = "JAMES MADISON";
|
||||
this[4] = "JAMES MONROE";
|
||||
this[5] = "JOHN QUINCY ADAMS";
|
||||
this[6] = "ANDREW JACKSON";
|
||||
this[7] = "MARTIN VAN BUREN";
|
||||
this[8] = "WILLIAM HENRY HARRISON";
|
||||
this[9] = "JOHN TYLER";
|
||||
this[10] = "JAMES POLK";
|
||||
this[11] = "ZACHARY TAYLOR";
|
||||
this[12] = "MILLARD FILLMORE";
|
||||
this[13] = "FRANKLIN PIERCE";
|
||||
this[14] = "JAMES BUCHANAN";
|
||||
this[15] = "ABRAHAM LINCOLN";
|
||||
this[16] = "ANDREW JOHNSON";
|
||||
this[17] = "ULYSSES GRANT";
|
||||
this[18] = "RUTHERFORD HAYES";
|
||||
this[19] = "JAMES GARFIELD";
|
||||
this[20] = "CHESTER ARTHUR";
|
||||
this[21] = "GROVER CLEVELAND";
|
||||
this[22] = "BENJAMIN HARRISON";
|
||||
this[23] = "GROVER CLEVELAND";
|
||||
this[24] = "WILLIAM MCKINLEY";
|
||||
this[25] = "THEODORE ROOSEVELT";
|
||||
this[26] = "WILLIAM HOWARD TAFT";
|
||||
this[27] = "WOODROW WILSON";
|
||||
this[28] = "WARREN HARDING";
|
||||
this[29] = "CALVIN COOLIDGE";
|
||||
this[30] = "HERBERT HOOVER";
|
||||
this[31] = "FRANKLIN ROOSEVELT";
|
||||
this[32] = "HARRY TRUMAN";
|
||||
this[33] = "DWIGHT EISENHOWER";
|
||||
this[34] = "JOHN KENNEDY";
|
||||
this[35] = "LYNDON JOHNSON";
|
||||
this[36] = "RICHARD NIXON";
|
||||
this[37] = "GERALD FORD";
|
||||
this[38] = "JIMMY CARTER";
|
||||
this[39] = "RONALD REAGAN";
|
||||
this[40] = "GEORGE BUSH";
|
||||
this[41] = "BILL CLINTON";
|
||||
}
|
||||
function availableLetters(i) {
|
||||
if (LettersSelected.charAt(i)==Alphabet[i])
|
||||
document.write('<TD ALIGN=CENTER VALIGN=CENTER WIDTH=20 HEIGHT=12>' +
|
||||
'<B><A HREF="javascript:LoadNextPage('+i+',\''+Alphabet[i]+
|
||||
'\')">'+Alphabet[i]+'</A></B></TD>');
|
||||
else
|
||||
document.write('<TD ALIGN=CENTER VALIGN=CENTER WIDTH=20 HEIGHT=12> </TD>');
|
||||
}
|
||||
function LoadNextPage(selected,letter) {
|
||||
var j=0;
|
||||
var HoldLettersSelected = LettersSelected;
|
||||
LettersSelected = "";
|
||||
if (selected == 0) {
|
||||
for (j=1; j<=25; j++) {
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
LettersSelected = "^" + LettersSelected;
|
||||
}
|
||||
else if (selected == 25) {
|
||||
for (j=0; j<=24; j++) {
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
LettersSelected += "^";
|
||||
}
|
||||
else {
|
||||
for (j=0; j<selected; j++)
|
||||
{
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
LettersSelected += "^";
|
||||
for (j=selected+1; j<=25; j++) {
|
||||
LettersSelected += HoldLettersSelected.charAt(j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SaveData = ImageNum + LettersSelected + RandomWord + "*";
|
||||
setCookie("_HangMan", SaveData, expdate);
|
||||
history.go(0);
|
||||
}
|
||||
|
||||
// Sets a cookie that will expire in 10 days
|
||||
|
||||
expdate.setTime (expdate.getTime() + (1000*60*60*24*10));
|
||||
if(getCookie("_HangMan") == null)
|
||||
{
|
||||
ImageNum = "A";
|
||||
LettersSelected = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
RandomWord = word[RandomNumber];
|
||||
SaveData = ImageNum + LettersSelected + RandomWord + "*";
|
||||
setCookie("_HangMan", SaveData, expdate);
|
||||
}
|
||||
else {
|
||||
SaveData = getCookie("_HangMan");
|
||||
ImageNum = SaveData.charAt(0);
|
||||
for (position=1; position<=26; position++) {
|
||||
LettersSelected += SaveData.charAt(position);
|
||||
}
|
||||
for (position=27; position<SaveData.indexOf("*"); position++) {
|
||||
RandomWord += SaveData.charAt(position);
|
||||
}
|
||||
}
|
||||
DisplayWord = "";
|
||||
for (i=0; i<RandomWord.length; i++) {
|
||||
if (RandomWord.charAt(i) == ' ') {
|
||||
DisplayWord += " ";
|
||||
}
|
||||
else {
|
||||
MatchFound = false;
|
||||
for (j=0; j<=25; j++) {
|
||||
if ((LettersSelected.charAt(j) == "^") && (RandomWord.charAt(i) == Alphabet[j])) {
|
||||
DisplayWord += RandomWord.charAt(i);
|
||||
MatchFound = true;
|
||||
}
|
||||
}
|
||||
if (!MatchFound) DisplayWord += "-";
|
||||
}
|
||||
}
|
||||
if (ImageNum == "J") {
|
||||
document.write('<font color=red size=4>You Lost!<br>Answer: "' + RandomWord + '"</font>');
|
||||
}
|
||||
else if (RandomWord == DisplayWord) {
|
||||
document.write('<font color=red size=8>You Win!</font>');
|
||||
}
|
||||
else {
|
||||
document.write('<table>');
|
||||
document.write('<tr>');
|
||||
for (i=0; i<13; i++) availableLetters(i);
|
||||
document.write('</tr>');
|
||||
document.write('<tr>');
|
||||
for (i=13; i<26; i++) availableLetters(i);
|
||||
document.write('</tr>');
|
||||
document.write('</table>');
|
||||
}
|
||||
document.write('<br>');
|
||||
document.write('<br>');
|
||||
document.write('<font size=9><tt>');
|
||||
document.write(DisplayWord);
|
||||
document.write('</tt></font>');
|
||||
document.write('<form>');
|
||||
document.write('<input type="button" VALUE="New Game"'+
|
||||
'onClick="delCookie(\'_HangMan\');history.go(0);">');
|
||||
document.write('</form>');
|
||||
document.write('</center>');
|
||||
</SCRIPT>
|
||||
<!-- End -->
|
||||
</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
294
games/math.html
@@ -1,148 +1,148 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Math Test!</title>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!-- Original: Anja Henseler -->
|
||||
<!-- Web Site: http://www.hens.com/binoculars -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
correct=0;
|
||||
wrong=0;
|
||||
|
||||
function random(maxValue) {
|
||||
day= new Date();
|
||||
hour= day.getHours();
|
||||
min=day.getMinutes();
|
||||
sec=day.getSeconds();
|
||||
mili=day.getTime()
|
||||
return(((hour*3600)+(min*60)+(sec)+mili) % maxValue);
|
||||
}
|
||||
function ranom(maxValue) {
|
||||
day= new Date();
|
||||
mil=day.getTime();
|
||||
return((mil) % maxValue);
|
||||
}
|
||||
|
||||
function add() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else {
|
||||
if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60;
|
||||
}
|
||||
}
|
||||
numA=random(maxValue);
|
||||
numB=ranom(maxValue);
|
||||
numC=numA + numB;
|
||||
Answer=window.prompt( numA + "+" + numB + " = ", "");
|
||||
ans();
|
||||
}
|
||||
function subtract() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else
|
||||
{if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60
|
||||
}
|
||||
}
|
||||
numA=random(maxValue);
|
||||
numB=ranom(maxValue);
|
||||
numC=numA - numB;
|
||||
Answer=window.prompt( numA + "-" + numB+ " = ", 0);
|
||||
ans()
|
||||
}
|
||||
function divide() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else {
|
||||
if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60
|
||||
}
|
||||
}
|
||||
numA=random(maxValue)+1;
|
||||
numB=ranom(maxValue)+1;
|
||||
numC=numA / numB;
|
||||
numC=Math.round(numC)
|
||||
window.alert("Please round your answer off:\n"
|
||||
+".5 or higher rounds one number up\n"
|
||||
+".4 or lower rounds one number down");
|
||||
Answer=window.prompt( numA + "/" + numB + " = ", 0);
|
||||
ans()
|
||||
}
|
||||
function multiply() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else {
|
||||
if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60
|
||||
}
|
||||
}
|
||||
numA=random(maxValue);
|
||||
numB=ranom(maxValue);
|
||||
numC=numA * numB;
|
||||
Answer=window.prompt( numA + "*" + numB + " = ", 0);
|
||||
ans();
|
||||
}
|
||||
function check() {
|
||||
if ((correct+wrong) != 0) {
|
||||
score = "" + ((correct / (correct + wrong)) * 100);
|
||||
score = score.substring(0,4) + "%";
|
||||
alert("YOUR SCORE: " + score + "\n"
|
||||
+ correct + " correct\n"
|
||||
+ wrong + " incorrect")
|
||||
}
|
||||
else alert("You have not completed any exercises yet.");
|
||||
}
|
||||
function ans() {
|
||||
if (Answer == numC) {
|
||||
correct++;
|
||||
msg = "Congratulations, your answer is correct.";
|
||||
}
|
||||
else {
|
||||
wrong++;
|
||||
msg = "Oops! " + Answer + " is incorrect.\n\n"
|
||||
+ "The correct answer was " +numC + ".";
|
||||
}
|
||||
score = "" + ((correct / (correct + wrong)) * 100);
|
||||
score = score.substring(0,4) + "%";
|
||||
alert(msg + "\n\nYOUR SCORE: " + score + "\n"
|
||||
+ correct + " correct\n"
|
||||
+ wrong + " incorrect")
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Math Test!</h1><br><hr><br>
|
||||
<center>
|
||||
<form name=quizform>
|
||||
<input type=button value="add" onClick="add()">
|
||||
<input type=button value="subtract" onClick="subtract()">
|
||||
<input type=button value="multiply" onClick="multiply()">
|
||||
<input type=button value="divide" onClick="divide()">
|
||||
<br>
|
||||
<br>
|
||||
<input type="radio" name="arithmetic">Easy
|
||||
<input type="radio" name="arithmetic" checked>Moderate
|
||||
<input type="radio" name="arithmetic">Difficult
|
||||
<br>
|
||||
<br>
|
||||
<input type=button value="Check Score" onClick="check()">
|
||||
<input type=button value="Reset Score" onClick="javascript:correct=0;wrong=0;">
|
||||
</form>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<title>Math Test!</title>
|
||||
<!-- Original: Anja Henseler -->
|
||||
<!-- Web Site: http://www.hens.com/binoculars -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin -->
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
correct=0;
|
||||
wrong=0;
|
||||
|
||||
function random(maxValue) {
|
||||
day= new Date();
|
||||
hour= day.getHours();
|
||||
min=day.getMinutes();
|
||||
sec=day.getSeconds();
|
||||
mili=day.getTime()
|
||||
return(((hour*3600)+(min*60)+(sec)+mili) % maxValue);
|
||||
}
|
||||
function ranom(maxValue) {
|
||||
day= new Date();
|
||||
mil=day.getTime();
|
||||
return((mil) % maxValue);
|
||||
}
|
||||
|
||||
function add() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else {
|
||||
if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60;
|
||||
}
|
||||
}
|
||||
numA=random(maxValue);
|
||||
numB=ranom(maxValue);
|
||||
numC=numA + numB;
|
||||
Answer=window.prompt( numA + "+" + numB + " = ", "");
|
||||
ans();
|
||||
}
|
||||
function subtract() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else
|
||||
{if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60
|
||||
}
|
||||
}
|
||||
numA=random(maxValue);
|
||||
numB=ranom(maxValue);
|
||||
numC=numA - numB;
|
||||
Answer=window.prompt( numA + "-" + numB+ " = ", 0);
|
||||
ans()
|
||||
}
|
||||
function divide() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else {
|
||||
if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60
|
||||
}
|
||||
}
|
||||
numA=random(maxValue)+1;
|
||||
numB=ranom(maxValue)+1;
|
||||
numC=numA / numB;
|
||||
numC=Math.round(numC)
|
||||
window.alert("Please round your answer off:\n"
|
||||
+".5 or higher rounds one number up\n"
|
||||
+".4 or lower rounds one number down");
|
||||
Answer=window.prompt( numA + "/" + numB + " = ", 0);
|
||||
ans()
|
||||
}
|
||||
function multiply() {
|
||||
if(document.quizform.arithmetic[0].checked)
|
||||
maxValue=10;
|
||||
else {
|
||||
if(document.quizform.arithmetic[1].checked)
|
||||
maxValue=30;
|
||||
else {
|
||||
maxValue=60
|
||||
}
|
||||
}
|
||||
numA=random(maxValue);
|
||||
numB=ranom(maxValue);
|
||||
numC=numA * numB;
|
||||
Answer=window.prompt( numA + "*" + numB + " = ", 0);
|
||||
ans();
|
||||
}
|
||||
function check() {
|
||||
if ((correct+wrong) != 0) {
|
||||
score = "" + ((correct / (correct + wrong)) * 100);
|
||||
score = score.substring(0,4) + "%";
|
||||
alert("YOUR SCORE: " + score + "\n"
|
||||
+ correct + " correct\n"
|
||||
+ wrong + " incorrect")
|
||||
}
|
||||
else alert("You have not completed any exercises yet.");
|
||||
}
|
||||
function ans() {
|
||||
if (Answer == numC) {
|
||||
correct++;
|
||||
msg = "Congratulations, your answer is correct.";
|
||||
}
|
||||
else {
|
||||
wrong++;
|
||||
msg = "Oops! " + Answer + " is incorrect.\n\n"
|
||||
+ "The correct answer was " +numC + ".";
|
||||
}
|
||||
score = "" + ((correct / (correct + wrong)) * 100);
|
||||
score = score.substring(0,4) + "%";
|
||||
alert(msg + "\n\nYOUR SCORE: " + score + "\n"
|
||||
+ correct + " correct\n"
|
||||
+ wrong + " incorrect")
|
||||
}
|
||||
</script>
|
||||
<!-- End -->
|
||||
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Math Test!</h1><br><hr><br>
|
||||
<center>
|
||||
<form name=quizform>
|
||||
<input type=button value="add" onClick="add()">
|
||||
<input type=button value="subtract" onClick="subtract()">
|
||||
<input type=button value="multiply" onClick="multiply()">
|
||||
<input type=button value="divide" onClick="divide()">
|
||||
<br>
|
||||
<br>
|
||||
<input type="radio" name="arithmetic">Easy
|
||||
<input type="radio" name="arithmetic" checked>Moderate
|
||||
<input type="radio" name="arithmetic">Difficult
|
||||
<br>
|
||||
<br>
|
||||
<input type=button value="Check Score" onClick="check()">
|
||||
<input type=button value="Reset Score" onClick="javascript:correct=0;wrong=0;">
|
||||
</form>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,133 +1,134 @@
|
||||
<html>
|
||||
<head><SCRIPT LANGUAGE="JavaScript">
|
||||
<!-- Original: Brian Gosselin (bgaudiodr@aol.com) -->
|
||||
<!-- Web Site: http://www.bgaudiodr.iwarp.com -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
var pics = new Array();
|
||||
for (i = 0; i <= 18; i++) {
|
||||
pics[i] = new Image();
|
||||
pics[i].src = 'image' + i + '.gif';
|
||||
}
|
||||
var map=new Array(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18);
|
||||
var user = new Array();
|
||||
var temparray = new Array();
|
||||
var clickarray = new Array(0, 0);
|
||||
var ticker, sec, min, ctr, id, oktoclick, finished;
|
||||
function init() {
|
||||
clearTimeout(id);
|
||||
for (i = 0; i <= 35 ;i++) {
|
||||
user[i] = 0;
|
||||
}
|
||||
ticker = 0;
|
||||
min = 0;
|
||||
sec = 0;
|
||||
ctr = 0;
|
||||
oktoclick = true;
|
||||
finished = 0;
|
||||
document.f.b.value = "";
|
||||
scramble();
|
||||
runclk();
|
||||
for (i = 0; i <= 35; i++) {
|
||||
document.f[('img'+i)].src = "image0.gif";
|
||||
}
|
||||
}
|
||||
function runclk() {
|
||||
min = Math.floor(ticker/60);
|
||||
sec = (ticker-(min*60))+'';
|
||||
if(sec.length == 1) {sec = "0"+sec};
|
||||
ticker++;
|
||||
document.f.b.value = min+":"+sec;
|
||||
id = setTimeout('runclk()', 1000);
|
||||
}
|
||||
function scramble() {
|
||||
for (z = 0; z < 5; z++) {
|
||||
for (x = 0; x <= 35; x++) {
|
||||
temparray[0] = Math.floor(Math.random()*36);
|
||||
temparray[1] = map[temparray[0]];
|
||||
temparray[2] = map[x];
|
||||
map[x] = temparray[1];
|
||||
map[temparray[0]] = temparray[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
function showimage(but) {
|
||||
if (oktoclick) {
|
||||
oktoclick = false;
|
||||
document.f[('img'+but)].src = 'image'+map[but]+'.gif';
|
||||
if (ctr == 0) {
|
||||
ctr++;
|
||||
clickarray[0] = but;
|
||||
oktoclick = true;
|
||||
} else {
|
||||
clickarray[1] = but;
|
||||
ctr = 0;
|
||||
setTimeout('returntoold()', 600);
|
||||
}
|
||||
}
|
||||
}
|
||||
function returntoold() {
|
||||
if ((clickarray[0] == clickarray[1]) && (!user[clickarray[0]])) {
|
||||
document.f[('img'+clickarray[0])].src = "image0.gif";
|
||||
oktoclick = true;
|
||||
} else {
|
||||
if (map[clickarray[0]] != map[clickarray[1]]) {
|
||||
if (user[clickarray[0]] == 0) {
|
||||
document.f[('img'+clickarray[0])].src = "image0.gif";
|
||||
}
|
||||
if (user[clickarray[1]] == 0) {
|
||||
document.f[('img'+clickarray[1])].src = "image0.gif";
|
||||
}
|
||||
}
|
||||
if (map[clickarray[0]] == map[clickarray[1]]) {
|
||||
if (user[clickarray[0]] == 0&&user[clickarray[1]] == 0) { finished++; }
|
||||
user[clickarray[0]] = 1;
|
||||
user[clickarray[1]] = 1;
|
||||
}
|
||||
if (finished >= 18) {
|
||||
alert('You did it in '+document.f.b.value+' !');
|
||||
init();
|
||||
} else {
|
||||
oktoclick = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
|
||||
<title>Memory</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk" OnLoad="init()">
|
||||
<center><h1>Memory Game</h1><br><hr><br>
|
||||
<form name="f">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<script language="javascript">
|
||||
<!-- Begin
|
||||
for (r = 0; r <= 5; r++) {
|
||||
document.write('<tr>');
|
||||
for (c = 0; c <= 5; c++) {
|
||||
document.write('<td align="center">');
|
||||
document.write('<a href="javascript:showimage('+((6*r)+c)+')" onClick="document.f.b.focus()">');
|
||||
document.write('<img src="image0.gif" name="img'+((6*r)+c)+'" border="0">');
|
||||
document.write('</a></td>');
|
||||
}
|
||||
document.write('</tr>');
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
</table>
|
||||
<br><br>
|
||||
<input type="button" value=" " name="b" onClick="init()">
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
|
||||
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Original: Brian Gosselin (bgaudiodr@aol.com) -->
|
||||
<!-- Web Site: http://www.bgaudiodr.iwarp.com -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin -->
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
var pics = new Array();
|
||||
for (i = 0; i <= 18; i++) {
|
||||
pics[i] = new Image();
|
||||
pics[i].src = 'image' + i + '.gif';
|
||||
}
|
||||
var map=new Array(1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18);
|
||||
var user = new Array();
|
||||
var temparray = new Array();
|
||||
var clickarray = new Array(0, 0);
|
||||
var ticker, sec, min, ctr, id, oktoclick, finished;
|
||||
function init() {
|
||||
clearTimeout(id);
|
||||
for (i = 0; i <= 35 ;i++) {
|
||||
user[i] = 0;
|
||||
}
|
||||
ticker = 0;
|
||||
min = 0;
|
||||
sec = 0;
|
||||
ctr = 0;
|
||||
oktoclick = true;
|
||||
finished = 0;
|
||||
document.f.b.value = "";
|
||||
scramble();
|
||||
runclk();
|
||||
for (i = 0; i <= 35; i++) {
|
||||
document.f[('img'+i)].src = "image0.gif";
|
||||
}
|
||||
}
|
||||
function runclk() {
|
||||
min = Math.floor(ticker/60);
|
||||
sec = (ticker-(min*60))+'';
|
||||
if(sec.length == 1) {sec = "0"+sec};
|
||||
ticker++;
|
||||
document.f.b.value = min+":"+sec;
|
||||
id = setTimeout('runclk()', 1000);
|
||||
}
|
||||
function scramble() {
|
||||
for (z = 0; z < 5; z++) {
|
||||
for (x = 0; x <= 35; x++) {
|
||||
temparray[0] = Math.floor(Math.random()*36);
|
||||
temparray[1] = map[temparray[0]];
|
||||
temparray[2] = map[x];
|
||||
map[x] = temparray[1];
|
||||
map[temparray[0]] = temparray[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
function showimage(but) {
|
||||
if (oktoclick) {
|
||||
oktoclick = false;
|
||||
document.f[('img'+but)].src = 'image'+map[but]+'.gif';
|
||||
if (ctr == 0) {
|
||||
ctr++;
|
||||
clickarray[0] = but;
|
||||
oktoclick = true;
|
||||
} else {
|
||||
clickarray[1] = but;
|
||||
ctr = 0;
|
||||
setTimeout('returntoold()', 600);
|
||||
}
|
||||
}
|
||||
}
|
||||
function returntoold() {
|
||||
if ((clickarray[0] == clickarray[1]) && (!user[clickarray[0]])) {
|
||||
document.f[('img'+clickarray[0])].src = "image0.gif";
|
||||
oktoclick = true;
|
||||
} else {
|
||||
if (map[clickarray[0]] != map[clickarray[1]]) {
|
||||
if (user[clickarray[0]] == 0) {
|
||||
document.f[('img'+clickarray[0])].src = "image0.gif";
|
||||
}
|
||||
if (user[clickarray[1]] == 0) {
|
||||
document.f[('img'+clickarray[1])].src = "image0.gif";
|
||||
}
|
||||
}
|
||||
if (map[clickarray[0]] == map[clickarray[1]]) {
|
||||
if (user[clickarray[0]] == 0&&user[clickarray[1]] == 0) { finished++; }
|
||||
user[clickarray[0]] = 1;
|
||||
user[clickarray[1]] = 1;
|
||||
}
|
||||
if (finished >= 18) {
|
||||
alert('You did it in '+document.f.b.value+' !');
|
||||
init();
|
||||
} else {
|
||||
oktoclick = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- End -->
|
||||
|
||||
<title>Memory</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk" OnLoad="init()">
|
||||
<center><h1>Memory Game</h1><br><hr><br>
|
||||
<form name="f">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<!-- Begin -->
|
||||
<script language="javascript">
|
||||
for (r = 0; r <= 5; r++) {
|
||||
document.write('<tr>');
|
||||
for (c = 0; c <= 5; c++) {
|
||||
document.write('<td align="center">');
|
||||
document.write('<a href="javascript:showimage('+((6*r)+c)+')" onClick="document.f.b.focus()">');
|
||||
document.write('<img src="image0.gif" name="img'+((6*r)+c)+'" border="0">');
|
||||
document.write('</a></td>');
|
||||
}
|
||||
document.write('</tr>');
|
||||
}
|
||||
</script>
|
||||
<!-- End -->
|
||||
</table>
|
||||
<br><br>
|
||||
<input type="button" value=" " name="b" onClick="init()">
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
|
||||
by <a href="#">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,15 +1,15 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Pac Man</title>
|
||||
<META NAME="Generator" CONTENT="NetObjects Fusion Trial 2.0.2 for Windows">
|
||||
<META name="keywords" content="games, pacman, Pac-Man, java, applet">
|
||||
</HEAD>
|
||||
<BODY background="pacmaze1.jpg" TEXT="#ffffff">
|
||||
|
||||
|
||||
<CENTER><IMG SRC="pactitle.jpg" ></CENTER>
|
||||
<CENTER><applet code="PacManApp.class" width=526 height=427></applet></CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Pac Man</title>
|
||||
<META NAME="Generator" CONTENT="NetObjects Fusion Trial 2.0.2 for Windows">
|
||||
<META name="keywords" content="games, pacman, Pac-Man, java, applet">
|
||||
</HEAD>
|
||||
<BODY background="pacmaze1.jpg" TEXT="#ffffff">
|
||||
|
||||
|
||||
<CENTER><IMG SRC="pactitle.jpg" ></CENTER>
|
||||
<CENTER><!--<applet code="PacManApp.class" width=526 height=427></applet>--></CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,44 +0,0 @@
|
||||
|
||||
<?
|
||||
|
||||
/*
|
||||
include("../../global.php");
|
||||
|
||||
$headtag = '';
|
||||
|
||||
// below is the bodytag,headtag,tablecolor
|
||||
|
||||
head("",$headtag,"",$cat);
|
||||
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- START MAIN BODY CONTENT-->
|
||||
|
||||
|
||||
<!--TITLE HERE-->
|
||||
|
||||
<DIV ALIGN="center"><FONT SIZE="4"><B>Pacman</B></FONT>
|
||||
|
||||
<BR><BR><BR>
|
||||
<!--DESCRIPTION HERE-->
|
||||
|
||||
The old arcade classic video game reborn in a java applet! Great fun!
|
||||
<BR><BR>
|
||||
<!--BODY CODE HERE-->
|
||||
<applet code="PacManApp.class" width=526 height=427></applet><BR><BR>
|
||||
|
||||
Author: Jean Francois Buisson
|
||||
|
||||
<BR><BR>
|
||||
|
||||
<A href="http://www.javafile.com/games/pacman/pacman.zip"><B>Download the Script</B></A></P>
|
||||
|
||||
</DIV>
|
||||
|
||||
|
||||
<!-- END MAIN BODY CONTENT-->
|
||||
|
||||
|
||||
|
||||
<? footer(); ?>
|
@@ -1,19 +1,19 @@
|
||||
THIS SCRIPT BROUGHT TO YOU BY JAVAFILE.COM - http://www.javafile.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PASTE THIS SCRIPT INTO YOUR BODY TAG
|
||||
|
||||
<BODY background="pacmaze1.jpg" TEXT="#ffffff">
|
||||
|
||||
<applet code="PacManApp.class" width=526 height=427></applet></CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
THIS SCRIPT BROUGHT TO YOU BY JAVAFILE.COM - http://www.javafile.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PASTE THIS SCRIPT INTO YOUR BODY TAG
|
||||
|
||||
<BODY background="pacmaze1.jpg" TEXT="#ffffff">
|
||||
|
||||
<applet code="PacManApp.class" width=526 height=427></applet></CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
THIS SCRIPT BROUGHT TO YOU BY JAVAFILE.COM - http://www.javafile.com
|
@@ -1,182 +1,182 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Box Puzzle</title>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!-- Original: John Chacko (johns221b@yahoo.com) -->
|
||||
<!-- Web Site: http://holmes221b.50megs.com -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin
|
||||
var blank_pos = 16, count = 0, pos = new Array(), nam = new Array();
|
||||
pos[1] = 7;
|
||||
pos[2] = 10;
|
||||
pos[3] = 14;
|
||||
pos[4] = 9;
|
||||
pos[5] = 12;
|
||||
pos[6] = 2;
|
||||
pos[7] = 13;
|
||||
pos[8] = 1;
|
||||
pos[9] = 8;
|
||||
pos[10] = 5;
|
||||
pos[11] = 4;
|
||||
pos[12] = 6;
|
||||
pos[13] = 3;
|
||||
pos[14] = 11;
|
||||
pos[15] = 15;
|
||||
function start() {
|
||||
nam[1] = L1.style;
|
||||
nam[2] = L2.style;
|
||||
nam[3] = L3.style;
|
||||
nam[4] = L4.style;
|
||||
nam[5] = L5.style;
|
||||
nam[6] = L6.style;
|
||||
nam[7] = L7.style;
|
||||
nam[8] = L8.style;
|
||||
nam[9] = L9.style;
|
||||
nam[10] = L10.style;
|
||||
nam[11] = L11.style;
|
||||
nam[12] = L12.style;
|
||||
nam[13] = L13.style;
|
||||
nam[14] = L14.style;
|
||||
nam[15] = L15.style;
|
||||
document.onkeydown = keyDown;
|
||||
}
|
||||
function keyDown() {
|
||||
var ieKey = event.keyCode;
|
||||
if (ieKey == 38) {
|
||||
if (blank_pos < 13) {
|
||||
count=blank_pos + 4;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].top));
|
||||
nam[X].top = Z - 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else if (ieKey == 40) {
|
||||
if (blank_pos > 4) {
|
||||
count = blank_pos - 4;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].top));
|
||||
nam[X].top = Z + 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else if (ieKey == 37) {
|
||||
r = blank_pos % 4
|
||||
if (r == 0) {
|
||||
}
|
||||
else {
|
||||
count = blank_pos + 1;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].left));
|
||||
nam[X].left = Z - 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else if (ieKey == 39) {
|
||||
ch = blank_pos + 3;
|
||||
r = ch % 4;
|
||||
if (r == 0) {
|
||||
}
|
||||
else {
|
||||
count = blank_pos - 1;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].left));
|
||||
nam[X].left = Z + 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert("PLEASE USE PROPER KEYS");
|
||||
}
|
||||
A = false;
|
||||
b = 0;
|
||||
for (i = 1; i < 16; i++) {
|
||||
b++;
|
||||
if (pos[i] == b) {
|
||||
A = true;
|
||||
}
|
||||
else {
|
||||
A = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (A)alert("CONGRATULATIONS");
|
||||
}
|
||||
function fun(count) {
|
||||
for (var i = 1; i < 16; i++) {
|
||||
if (pos[i] == count) {
|
||||
var X = i;
|
||||
}
|
||||
}
|
||||
return X;
|
||||
}
|
||||
// End -->
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk" onLoad="start()">
|
||||
<h1><center>Box Puzzle</h1><br><hr><br>Use the arrow keys on your keyboard to play.<br>
|
||||
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
|
||||
|
||||
<div ID="L8" STYLE="position:absolute; left:202px; top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>8</center>
|
||||
</div>
|
||||
<div ID="L6" STYLE="position:absolute; left:254px;top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>6</center>
|
||||
</div>
|
||||
<div ID="L13" STYLE="position:absolute; left:306px;top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>13</center>
|
||||
</div>
|
||||
<div ID="L11" STYLE="position:absolute; left:358px;top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>11</center>
|
||||
</div>
|
||||
<div ID="L10" STYLE="position:absolute; left:202px; top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>10</center>
|
||||
</div>
|
||||
<div ID="L12" STYLE="position:absolute; left:254px;top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>12</center>
|
||||
</div>
|
||||
<div ID="L1" STYLE="position:absolute; left:306px;top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>1</center>
|
||||
</div>
|
||||
<div ID="L9" STYLE="position:absolute; left:358px;top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>9</center>
|
||||
</div>
|
||||
<div ID="L4" STYLE="position:absolute; left:202px; top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>4</center>
|
||||
</div>
|
||||
<div ID="L2" STYLE="position:absolute; left:254px;top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>2</center>
|
||||
</div>
|
||||
<div ID="L14" STYLE="position:absolute; left:306px;top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>14</center>
|
||||
</div>
|
||||
<div ID="L5" STYLE="position:absolute; left:358px;top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>5</center>
|
||||
</div>
|
||||
<div ID="L7" STYLE="position:absolute; left:202px; top:458px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>7</center>
|
||||
</div>
|
||||
<div ID="L3" STYLE="position:absolute; left:254px;top:458px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>3</center>
|
||||
</div>
|
||||
<div ID="L15" STYLE="position:absolute; left:306px;top:458px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>15</center>
|
||||
</div>
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
|
||||
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Box Puzzle</title>
|
||||
<!-- Original: John Chacko (johns221b@yahoo.com) -->
|
||||
<!-- Web Site: http://holmes221b.50megs.com -->
|
||||
|
||||
<!-- This script and many more are available free online at -->
|
||||
<!-- The JavaScript Source!! http://javascript.internet.com -->
|
||||
|
||||
<!-- Begin -->
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
var blank_pos = 16, count = 0, pos = new Array(), nam = new Array();
|
||||
pos[1] = 7;
|
||||
pos[2] = 10;
|
||||
pos[3] = 14;
|
||||
pos[4] = 9;
|
||||
pos[5] = 12;
|
||||
pos[6] = 2;
|
||||
pos[7] = 13;
|
||||
pos[8] = 1;
|
||||
pos[9] = 8;
|
||||
pos[10] = 5;
|
||||
pos[11] = 4;
|
||||
pos[12] = 6;
|
||||
pos[13] = 3;
|
||||
pos[14] = 11;
|
||||
pos[15] = 15;
|
||||
function start() {
|
||||
nam[1] = L1.style;
|
||||
nam[2] = L2.style;
|
||||
nam[3] = L3.style;
|
||||
nam[4] = L4.style;
|
||||
nam[5] = L5.style;
|
||||
nam[6] = L6.style;
|
||||
nam[7] = L7.style;
|
||||
nam[8] = L8.style;
|
||||
nam[9] = L9.style;
|
||||
nam[10] = L10.style;
|
||||
nam[11] = L11.style;
|
||||
nam[12] = L12.style;
|
||||
nam[13] = L13.style;
|
||||
nam[14] = L14.style;
|
||||
nam[15] = L15.style;
|
||||
document.onkeydown = keyDown;
|
||||
}
|
||||
function keyDown() {
|
||||
var ieKey = event.keyCode;
|
||||
if (ieKey == 38) {
|
||||
if (blank_pos < 13) {
|
||||
count=blank_pos + 4;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].top));
|
||||
nam[X].top = Z - 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else if (ieKey == 40) {
|
||||
if (blank_pos > 4) {
|
||||
count = blank_pos - 4;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].top));
|
||||
nam[X].top = Z + 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else if (ieKey == 37) {
|
||||
r = blank_pos % 4
|
||||
if (r == 0) {
|
||||
}
|
||||
else {
|
||||
count = blank_pos + 1;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].left));
|
||||
nam[X].left = Z - 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else if (ieKey == 39) {
|
||||
ch = blank_pos + 3;
|
||||
r = ch % 4;
|
||||
if (r == 0) {
|
||||
}
|
||||
else {
|
||||
count = blank_pos - 1;
|
||||
X = fun(count);
|
||||
Z = (parseInt(nam[X].left));
|
||||
nam[X].left = Z + 52;
|
||||
Q = pos[X];
|
||||
pos[X] = blank_pos;
|
||||
blank_pos = Q;
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert("PLEASE USE PROPER KEYS");
|
||||
}
|
||||
A = false;
|
||||
b = 0;
|
||||
for (i = 1; i < 16; i++) {
|
||||
b++;
|
||||
if (pos[i] == b) {
|
||||
A = true;
|
||||
}
|
||||
else {
|
||||
A = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (A)alert("CONGRATULATIONS");
|
||||
}
|
||||
function fun(count) {
|
||||
for (var i = 1; i < 16; i++) {
|
||||
if (pos[i] == count) {
|
||||
var X = i;
|
||||
}
|
||||
}
|
||||
return X;
|
||||
}
|
||||
</script>
|
||||
<!-- End -->
|
||||
</head>
|
||||
<body bgcolor="Cornsilk" onLoad="start()">
|
||||
<h1><center>Box Puzzle</h1><br><hr><br>Use the arrow keys on your keyboard to play.<br>
|
||||
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
|
||||
|
||||
<div ID="L8" STYLE="position:absolute; left:202px; top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>8</center>
|
||||
</div>
|
||||
<div ID="L6" STYLE="position:absolute; left:254px;top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>6</center>
|
||||
</div>
|
||||
<div ID="L13" STYLE="position:absolute; left:306px;top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>13</center>
|
||||
</div>
|
||||
<div ID="L11" STYLE="position:absolute; left:358px;top:302px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>11</center>
|
||||
</div>
|
||||
<div ID="L10" STYLE="position:absolute; left:202px; top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>10</center>
|
||||
</div>
|
||||
<div ID="L12" STYLE="position:absolute; left:254px;top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>12</center>
|
||||
</div>
|
||||
<div ID="L1" STYLE="position:absolute; left:306px;top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>1</center>
|
||||
</div>
|
||||
<div ID="L9" STYLE="position:absolute; left:358px;top:354px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>9</center>
|
||||
</div>
|
||||
<div ID="L4" STYLE="position:absolute; left:202px; top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>4</center>
|
||||
</div>
|
||||
<div ID="L2" STYLE="position:absolute; left:254px;top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>2</center>
|
||||
</div>
|
||||
<div ID="L14" STYLE="position:absolute; left:306px;top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>14</center>
|
||||
</div>
|
||||
<div ID="L5" STYLE="position:absolute; left:358px;top:406px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>5</center>
|
||||
</div>
|
||||
<div ID="L7" STYLE="position:absolute; left:202px; top:458px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>7</center>
|
||||
</div>
|
||||
<div ID="L3" STYLE="position:absolute; left:254px;top:458px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>3</center>
|
||||
</div>
|
||||
<div ID="L15" STYLE="position:absolute; left:306px;top:458px; width:50px; height:50px; background-color:green;">
|
||||
<br><b><center>15</center>
|
||||
</div>
|
||||
|
||||
<p><center>
|
||||
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
|
||||
by <a href="#">The JavaScript Source</a></font>
|
||||
</center><p>
|
||||
</body>
|
||||
</html>
|
||||
|
BIN
games/redchecker.gif
Normal file
After Width: | Height: | Size: 981 B |
@@ -1,25 +1,263 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Games</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Tic-Tac-Toe</h1><br><hr><br><font color="red" face="Comic Sans MS">Good Luck!
|
||||
|
||||
<table border=0 cellspacing=0 cellpadding=0 width=438>
|
||||
<tr valign="top" align="center">
|
||||
<td><img src="http://www.geocities.com/clipart/pbi/c.gif" height=1 width=212></td>
|
||||
<td><img src="http://www.geocities.com/clipart/pbi/c.gif" height=1 width=226></td>
|
||||
<td><img src="http://www.geocities.com/clipart/pbi/c.gif" height=1 width=1></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan=3 height=175></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan=1 height=289></td>
|
||||
<td colspan=1 rowspan=1 width=226><!-- Tic-Tac-Toe -->
|
||||
<SCRIPT language="JavaScript" src="http://www.geocities.com/addon/gadget-tic-100-100/"></SCRIPT><NOSCRIPT><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><A HREF="http://www.geocities.com/addon/gadget-tic-100-210/" TARGET="_top"><IMG SRC="http://www.geocities.com/addon/gadget-tic-100-220/" ISMAP BORDER=0></A></TD></TR><TR><TD><A HREF="http://www.geocities.com/addon/gadget-tic-100-310/" TARGET="_top"><IMG SRC="http://www.geocities.com/addon/gadget-tic-100-320/" ISMAP BORDER=0></A></TD></TR></TABLE></NOSCRIPT></td>
|
||||
<td colspan=1 height=289></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Games</title>
|
||||
</head>
|
||||
<body bgcolor="Cornsilk">
|
||||
<center><h1>Tic-Tac-Toe</h1><br><hr><br><font color="red" face="Comic Sans MS">Good Luck!
|
||||
|
||||
<table border=0 cellspacing=0 cellpadding=0 width=438>
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan=1 rowspan=1 width=226><!-- Tic-Tac-Toe -->
|
||||
|
||||
<SCRIPT TYPE="text/javascript">
|
||||
|
||||
var ticPRELOADTHESE = new Array("shall1","shall2","shall3","shall4","shall5","shall6","shall7","shall8","shall9","shall10","shall11","shall12","shall13","shall14","shall15","win1","win2","win3","win4","win5","tie1","tie2","tie3","tie4","tie5","lose1","lose2","lose3","lose4","lose5","x","o","x_lite","o_lite","ticNEWGAME_on","ticNEWGAME_off","ticQUIT_on","ticQUIT_off");
|
||||
var ticIMAGECACHE = new Array(37);
|
||||
for (var ticCOUNTTHIS = 0; ticCOUNTTHIS < 37; ticCOUNTTHIS++) {
|
||||
ticIMAGECACHE[ticCOUNTTHIS] = new Image();
|
||||
ticIMAGECACHE[ticCOUNTTHIS].src = "tictac/" + ticPRELOADTHESE[ticCOUNTTHIS] + ".gif";
|
||||
}
|
||||
var ticGAMESTATE=0; //no interaction with player
|
||||
var ticNEWSCREEN = new Array(17);
|
||||
var ticSCREENBOARD = new Array(9);
|
||||
var ticBOARD = new Array(9);
|
||||
var ticFORCEDATA = new Array(1,0,1,3,0,0,3,3,1,3,3,1,3,0,0,1,0,1,1,3,3,0,0,3,1,0,1,1,0,1,0,0,3,1,3,3,1,0,1,3,1,3,0,3,0,0,3,1,3,1,0,0,3,1,0,3,0,3,1,3,1,0,1,1,3,0,0,1,3,1,3,0,0,1,1,3,3,1,3,3,0,1,1,0,1,3,3,0,3,3,0,3,3,1,3,3,1,1,0,3,3,0,3,3,1,0,1,1,3,0,3,0,1,1,3,1,3,3,1,3,0,1,1,3,0,3,3,1,3,1,1,0,3,1,3,3,0,3,1,1,0,3,1,3,1,3,3,1,1,3,0,3,0,3,3,0,3,1,3,1,1,0,0,3,0,3,1,1,3,3,1,0,1,1,3,1,3,0,3,3);
|
||||
var ticFLASHER = 10;
|
||||
var ticGOESFIRST = 0;
|
||||
var ticTIMERLOCATION = setTimeout("ticOPENFLASH()", 1000);
|
||||
|
||||
// opening flasher
|
||||
function ticOPENFLASH() {
|
||||
if ((ticFLASHER / 2) == Math.floor(ticFLASHER / 2)) {
|
||||
ticUPDATESCREEN(1);
|
||||
}
|
||||
else {
|
||||
ticUPDATESCREEN(0);
|
||||
}
|
||||
ticFLASHER--
|
||||
if (ticFLASHER > 0) {
|
||||
ticTIMERLOCATION = setTimeout("ticOPENFLASH()", 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// update the screen
|
||||
function ticUPDATESCREEN(ticX) {
|
||||
ticNEWSCREEN = ["pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green","pixel_blue","pixel_green"];
|
||||
if (ticX==1) ticNEWSCREEN = ["shall1","shall2","shall3","shall4","shall5","pixel_green","shall6","shall7","shall8","shall9","shall10","pixel_green","shall11","shall12","shall13","shall14","shall15"];
|
||||
if (ticX==2) ticNEWSCREEN = ["pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","win1","win2","win3","win4","win5","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green"];
|
||||
if (ticX==3) ticNEWSCREEN = ["pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","lose1","lose2","lose3","lose4","lose5","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green"];
|
||||
if (ticX==4) ticNEWSCREEN = [ticSCREENBOARD[0],"pixel_blue",ticSCREENBOARD[1],"pixel_blue",ticSCREENBOARD[2],"pixel_blue",ticSCREENBOARD[3],"pixel_blue",ticSCREENBOARD[4],"pixel_blue",ticSCREENBOARD[5],"pixel_blue",ticSCREENBOARD[6],"pixel_blue",ticSCREENBOARD[7],"pixel_blue",ticSCREENBOARD[8]];
|
||||
if (ticX==5) ticNEWSCREEN = ["master1","master2","master3","master4","master5","pixel_green","master6","master7","master8","master9","master10","pixel_green","master11","master12","master13","master14","master15"];
|
||||
if (ticX==6) ticNEWSCREEN = ["pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","tie1","tie2","tie3","tie4","tie5","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green","pixel_green"];
|
||||
for (ticX=0; ticX < 17; ticX++) {
|
||||
if (document.images["tic" + ticX].src != "tictac/" + ticNEWSCREEN[ticX] + ".gif") document.images["tic" + ticX].src = "tictac/" + ticNEWSCREEN[ticX] + ".gif";
|
||||
}
|
||||
}
|
||||
|
||||
// start a new game
|
||||
function ticPLAYGAME() {
|
||||
ticBOARD = [0,0,0,0,0,0,0,0,0];
|
||||
clearTimeout(ticTIMERLOCATION);
|
||||
ticUPDATEBOARD();
|
||||
if (ticGOESFIRST == 0) {
|
||||
ticME = "o";
|
||||
ticYOU = "x";
|
||||
ticGOESFIRST = 1;
|
||||
ticGAMESTATE = 20; // YOUR TURN
|
||||
document.images['ticTURN'].src = "tictac/turn1.gif"
|
||||
ticTIMERLOCATION = setTimeout("ticQUITGAME()", 60000); // IN CASE YOU WERE TEASING
|
||||
}
|
||||
else {
|
||||
ticME = "x";
|
||||
ticYOU = "o";
|
||||
ticGOESFIRST = 0;
|
||||
ticMYTURN()
|
||||
}
|
||||
}
|
||||
|
||||
//Here's the brain
|
||||
function ticMYTURN() {
|
||||
clearTimeout(ticTIMERLOCATION);
|
||||
ticGAMESTATE = 10; //MY TURN
|
||||
document.images['ticTURN'].src = "tictac/turn0.gif"
|
||||
setTimeout("ticMAKEMOVE()", 1000);
|
||||
}
|
||||
|
||||
function ticMAKEMOVE() {
|
||||
ticBESTMOVE = 0;
|
||||
ticBESTMOVE = ticCHECKWINNINGMOVE(1);
|
||||
if (ticBESTMOVE == -1) ticBESTMOVE = ticCHECKWINNINGMOVE(2);
|
||||
|
||||
//dummy array
|
||||
if (ticBESTMOVE == -1) {
|
||||
var ticDUMMY = new Array(4,0,2,6,8,1,3,5,7)
|
||||
for (ticX = 0; ticX < 9; ticX++) {
|
||||
if (ticBOARD[ticDUMMY[ticX]] == 0) {
|
||||
ticBESTMOVE = ticDUMMY[ticX];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//make my move here.
|
||||
ticBOARD[ticBESTMOVE] = 1;
|
||||
ticUPDATEBOARD();
|
||||
if (ticCHECKWINNER(1) == 0) {
|
||||
if (ticCHECKSTALEMATE() == 1) {
|
||||
ticUPDATESCREEN(6);
|
||||
ticGAMESTATE = 1;
|
||||
ticTIMERLOCATION = setTimeout("ticUPDATESCREEN(4)", 2000);
|
||||
return;
|
||||
}
|
||||
ticGAMESTATE = 20;
|
||||
document.images['ticTURN'].src = "tictac/turn1.gif";
|
||||
ticTIMERLOCATION = setTimeout("ticQUITGAME()", 60000);
|
||||
}
|
||||
else {
|
||||
ticGAMESTATE = 1;
|
||||
ticUPDATESCREEN(3);
|
||||
ticTIMERLOCATION = setTimeout("ticUPDATESCREEN(4)", 2000);
|
||||
}
|
||||
}
|
||||
|
||||
//look for a possible force win move
|
||||
function ticFINDFORCE() {
|
||||
var ticFORCEHERE = -1;
|
||||
for (ticX = 0; ticX < 20; ticX++) {
|
||||
ticV = 0;
|
||||
ticW = 0;
|
||||
for (ticY = 0; ticY < 9; ticY++) {
|
||||
if (ticBOARD[ticY] == ticFORCEDATA[(ticX * 9) + ticY]) {
|
||||
if (ticBOARD[ticY] == 0) ticV++;
|
||||
if (ticBOARD[ticY] == 1) ticW++;
|
||||
}
|
||||
if ((ticFORCEDATA[(ticX * 9) + ticY] == 1) && (ticBOARD[ticY] == 0)) ticTEMPFORCEHERE = ticY;
|
||||
}
|
||||
if ((ticV > 1) && (ticW > 1)) {
|
||||
ticFORCEHERE = ticTEMPFORCEHERE;
|
||||
}
|
||||
}
|
||||
return[ticFORCEHERE];
|
||||
}
|
||||
|
||||
|
||||
//checkwinner
|
||||
function ticCHECKWINNER(ticX) {
|
||||
if ((ticBOARD[0] == ticX) && (ticBOARD[1] == ticX) && (ticBOARD[2] == ticX)) return[1];
|
||||
else if ((ticBOARD[3] == ticX) && (ticBOARD[4] == ticX) && (ticBOARD[5] == ticX)) return[1];
|
||||
else if ((ticBOARD[6] == ticX) && (ticBOARD[7] == ticX) && (ticBOARD[8] == ticX)) return[1];
|
||||
else if ((ticBOARD[0] == ticX) && (ticBOARD[3] == ticX) && (ticBOARD[6] == ticX)) return[1];
|
||||
else if ((ticBOARD[1] == ticX) && (ticBOARD[4] == ticX) && (ticBOARD[7] == ticX)) return[1];
|
||||
else if ((ticBOARD[2] == ticX) && (ticBOARD[5] == ticX) && (ticBOARD[8] == ticX)) return[1];
|
||||
else if ((ticBOARD[0] == ticX) && (ticBOARD[4] == ticX) && (ticBOARD[8] == ticX)) return[1];
|
||||
else if ((ticBOARD[2] == ticX) && (ticBOARD[4] == ticX) && (ticBOARD[6] == ticX)) return[1];
|
||||
else return[0];
|
||||
}
|
||||
//check for winning move
|
||||
function ticCHECKWINNINGMOVE(ticX) {
|
||||
if ((ticBOARD[0] == 0) && (((ticBOARD[3] == ticX) && (ticBOARD[6] == ticX)) || ((ticBOARD[1] == ticX) && (ticBOARD[2] == ticX)) || ((ticBOARD[4] == ticX) && (ticBOARD[8] == ticX)))) return[0];
|
||||
else if ((ticBOARD[1] == 0) && (((ticBOARD[0] == ticX) && (ticBOARD[2] == ticX)) || ((ticBOARD[4] == ticX) && (ticBOARD[7] == ticX)))) return[1];
|
||||
else if ((ticBOARD[2] == 0) && (((ticBOARD[0] == ticX) && (ticBOARD[1] == ticX)) || ((ticBOARD[4] == ticX) && (ticBOARD[6] == ticX)) || ((ticBOARD[5] == ticX) && (ticBOARD[7] == ticX)))) return[2];
|
||||
else if ((ticBOARD[3] == 0) && (((ticBOARD[0] == ticX) && (ticBOARD[6] == ticX)) || ((ticBOARD[4] == ticX) && (ticBOARD[5] == ticX)))) return[3];
|
||||
else if ((ticBOARD[4] == 0) && (((ticBOARD[0] == ticX) && (ticBOARD[8] == ticX)) || ((ticBOARD[1] == ticX) && (ticBOARD[7] == ticX)) || ((ticBOARD[2] == ticX) && (ticBOARD[6] == ticX)) || ((ticBOARD[3] == ticX) && (ticBOARD[5] == ticX)))) return[4];
|
||||
else if ((ticBOARD[5] == 0) && (((ticBOARD[2] == ticX) && (ticBOARD[8] == ticX)) || ((ticBOARD[3] == ticX) && (ticBOARD[4] == ticX)))) return[5];
|
||||
else if ((ticBOARD[6] == 0) && (((ticBOARD[0] == ticX) && (ticBOARD[3] == ticX)) || ((ticBOARD[2] == ticX) && (ticBOARD[4] == ticX)) || ((ticBOARD[7] == ticX) && (ticBOARD[8] == ticX)))) return[6];
|
||||
else if ((ticBOARD[7] == 0) && (((ticBOARD[1] == ticX) && (ticBOARD[4] == ticX)) || ((ticBOARD[6] == ticX) && (ticBOARD[8] == ticX)))) return[7];
|
||||
else if ((ticBOARD[8] == 0) && (((ticBOARD[0] == ticX) && (ticBOARD[4] == ticX)) || ((ticBOARD[2] == ticX) && (ticBOARD[5] == ticX)) || ((ticBOARD[6] == ticX) && (ticBOARD[7] == ticX)))) return[8];
|
||||
else return[-1];
|
||||
}
|
||||
|
||||
//check for a stalemate
|
||||
function ticCHECKSTALEMATE(){
|
||||
var ticSTALL = 1
|
||||
for (ticX = 0; ticX < 9; ticX++){
|
||||
if (ticBOARD[ticX] == 0) ticSTALL=0;
|
||||
}
|
||||
if (ticSTALL == 1);
|
||||
return[ticSTALL];
|
||||
}
|
||||
|
||||
|
||||
//click on a square
|
||||
function ticTACTOE(ticX) {
|
||||
if (ticGAMESTATE < 10) ticPLAYGAME();
|
||||
else {
|
||||
if ((ticGAMESTATE == 20) && (ticBOARD[ticX] == 0)) {
|
||||
ticBOARD[ticX] = 2;
|
||||
ticUPDATEBOARD();
|
||||
if (ticCHECKWINNER(2) == 0) {
|
||||
if (ticCHECKSTALEMATE() == 1) {
|
||||
ticUPDATESCREEN(6);
|
||||
ticGAMESTATE = 1;
|
||||
ticTIMERLOCATION = setTimeout("ticUPDATESCREEN(4)", 2000);
|
||||
return;
|
||||
}
|
||||
ticMYTURN();
|
||||
}
|
||||
else {
|
||||
ticGAMESTATE = 1;
|
||||
ticUPDATESCREEN(2);
|
||||
ticTIMERLOCATION = setTimeout("ticUPDATESCREEN(4)", 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//roll on a square
|
||||
function ticTACON(ticX) {
|
||||
if ((ticGAMESTATE < 10) && (ticFLASHER < 1)) ticUPDATESCREEN(1);
|
||||
if ((ticX > -1) && (ticGAMESTATE == 20) && (ticBOARD[ticX/2] == 0)) {
|
||||
ticSCREENBOARD[ticX / 2] = ticYOU + "_lite";
|
||||
ticUPDATESCREEN(4);
|
||||
}
|
||||
}
|
||||
|
||||
//roll off a square
|
||||
function ticTACOFF(ticX) {
|
||||
if ((ticGAMESTATE < 10) && (ticFLASHER < 1)) ticUPDATESCREEN(0);
|
||||
if ((ticX > -1) && (GAMESTATE = 20) && (ticBOARD[ticX/2] == 0)) ticUPDATEBOARD();
|
||||
}
|
||||
|
||||
|
||||
//copy board to updateboard
|
||||
function ticUPDATEBOARD() {
|
||||
for (ticX = 0; ticX < 9; ticX++) {
|
||||
ticSCREENBOARD[ticX] = "pixel_green"
|
||||
if (ticBOARD[ticX] == 1) ticSCREENBOARD[ticX] = ticME
|
||||
if (ticBOARD[ticX] == 2) ticSCREENBOARD[ticX] = ticYOU
|
||||
}
|
||||
ticUPDATESCREEN(4);
|
||||
}
|
||||
|
||||
// quit game early
|
||||
function ticQUITGAME() {
|
||||
ticGAMESTATE = 1;
|
||||
ticUPDATESCREEN(3);
|
||||
ticTIMERLOCATION = setTimeout("ticUPDATESCREEN(4)", 2000);
|
||||
}
|
||||
|
||||
function ticROLLOFFOTHER() {
|
||||
document.images['ticNEWGAME'].src = "tictac/ticNEWGAME_off.gif";
|
||||
document.images['ticQUIT'].src = "tictac/ticQUIT_off.gif";
|
||||
}
|
||||
|
||||
// Roll over on
|
||||
function ticIMAGEON(ticNEWIMAGE) {
|
||||
document.images[ticNEWIMAGE].src = "tictac/" + ticNEWIMAGE + "_on.gif";
|
||||
}
|
||||
document.write('<table width=226 cellpadding=0 cellspacing=0 border=0><tr><td><table width=164 cellpadding=0 cellspacing=0 border=0> <tr><td><img src="tictac/outtop.gif" height=44 width=164></td></tr><tr><td align="center" bgcolor="#003366"><table cellpadding=0 cellspacing=0 border=0><tr><td rowspan=5 bgcolor="#ffffff" width=8><img src="tictac/pixel_green.gif" width=8 height=128></td><td><a href="javascript:ticTACTOE(0)" onMouseOver="ticTACON(0)" onMouseOut="ticTACOFF(0)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic0"></a></td><td><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=4 height=40 border=0 name="tic1"></a></td><td><a href="javascript:ticTACTOE(1)" onMouseOver="ticTACON(2)" onMouseOut="ticTACOFF(2)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic2"></a></td><td><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=4 height=40 border=0 name="tic3"></a></td><td><a href="javascript:ticTACTOE(2)" onMouseOver="ticTACON(4)" onMouseOut="ticTACOFF(4)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic4"></a></td><td rowspan=5 bgcolor="#ffffff" width=8><img src="tictac/pixel_green.gif" width=8 height=128></td></tr><tr><td colspan=5><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=128 height=4 name="tic5" border=0></a></td></tr>');
|
||||
document.write('<tr><td><a href="javascript:ticTACTOE(3)" onMouseOver="ticTACON(6)" onMouseOut="ticTACOFF(6)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic6"></a></td><td><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=4 height=40 border=0 name="tic7"></a></td><td><a href="javascript:ticTACTOE(4)" onMouseOver="ticTACON(8)" onMouseOut="ticTACOFF(8)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic8"></a></td>');
|
||||
document.write('<td><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=4 height=40 border=0 name="tic9"></a></td><td><a href="javascript:ticTACTOE(5)" onMouseOver="ticTACON(10)" onMouseOut="ticTACOFF(10)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic10"></a></td></tr><tr><td colspan=5><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=128 height=4 border=0 name="tic11"></a></td></tr><tr><td><a href="javascript:ticTACTOE(6)" onMouseOver="ticTACON(12)" onMouseOut="ticTACOFF(12)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic12"></a></td><td><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=4 height=40 border=0 name="tic13"></a></td><td><a href="javascript:ticTACTOE(7)" onMouseOver="ticTACON(14)" onMouseOut="ticTACOFF(14)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic14"></a></td><td><a href="javascript:ticTACTOE(-1)" onMouseOver="ticTACON(-1)" onMouseOut="ticTACOFF(-1)"><img src="tictac/pixel_blue.gif" width=4 height=40 border=0 name="tic15"></a></td><td><a href="javascript:ticTACTOE(8)" onMouseOver="ticTACON(16)" onMouseOut="ticTACOFF(16)"><img src="tictac/pixel_green.gif" width=40 height=40 border=0 name="tic16"></a></td></tr></table></td></tr><tr><td bgcolor="#003366" align="center"><img src="tictac/in_bottom.gif" height=8 width=144></td></tr>');
|
||||
document.write('<tr><td bgcolor="#003366" align="center"><img src="tictac/pixel_blue.gif" height=20 width=144 name="ticTURN"></td></tr><tr><td bgcolor="#003366"> </td></tr><tr><td bgcolor="#003366" align="center"><font face="helvetica,arial" size=1 color="#FFFFFF"> <br><img src="tictac/pixel.gif" width=120 height=20></td></tr><tr><td bgcolor="#003366"> </td></tr>');
|
||||
document.write('<tr><td><a href="tictac/outbottom.gif" height=18 width=164 border=0></a></td></tr></table></td><td valign="top"><br><br><table width=62 cellpadding=0 cellspacing=0 border=0><tr><td><img src="tictac/sidetop.gif" height=10 width=62></td></tr><tr><td bgcolor="#003366"> </td></tr><tr><td><a href="javascript:ticPLAYGAME()" onMouseOver="ticIMAGEON(\'ticNEWGAME\')" onMouseOut="ticROLLOFFOTHER()"><img src="tictac/ticNEWGAME_off.gif" height=12 width=62 border=0 name="ticNEWGAME"></a></td></tr><tr><td><a href="javascript:ticQUITGAME()" onMouseOver="ticIMAGEON(\'ticQUIT\')" onMouseOut="ticROLLOFFOTHER()"><img src="tictac/ticQUIT_off.gif" height=12 width=62 border=0 name="ticQUIT"></a></td></tr><tr><td bgcolor="#003366"> </td></tr><tr><td><img src="tictac/sidebottom.gif" height=10 width=62></td></tr></table></td></tr></table>');
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
BIN
games/tictac/in_bottom.gif
Normal file
After Width: | Height: | Size: 103 B |
BIN
games/tictac/lose1.gif
Normal file
After Width: | Height: | Size: 232 B |
BIN
games/tictac/lose2.gif
Normal file
After Width: | Height: | Size: 79 B |
BIN
games/tictac/lose3.gif
Normal file
After Width: | Height: | Size: 245 B |
BIN
games/tictac/lose4.gif
Normal file
After Width: | Height: | Size: 94 B |
BIN
games/tictac/lose5.gif
Normal file
After Width: | Height: | Size: 250 B |
BIN
games/tictac/o.gif
Normal file
After Width: | Height: | Size: 214 B |
BIN
games/tictac/o_lite.gif
Normal file
After Width: | Height: | Size: 215 B |
BIN
games/tictac/outbottom.gif
Normal file
After Width: | Height: | Size: 230 B |
BIN
games/tictac/outtop.gif
Normal file
After Width: | Height: | Size: 784 B |
BIN
games/tictac/pixel.gif
Normal file
After Width: | Height: | Size: 42 B |
BIN
games/tictac/pixel_blue.gif
Normal file
After Width: | Height: | Size: 61 B |
BIN
games/tictac/pixel_green.gif
Normal file
After Width: | Height: | Size: 61 B |
BIN
games/tictac/shall1.gif
Normal file
After Width: | Height: | Size: 250 B |
BIN
games/tictac/shall10.gif
Normal file
After Width: | Height: | Size: 162 B |
BIN
games/tictac/shall11.gif
Normal file
After Width: | Height: | Size: 175 B |
BIN
games/tictac/shall12.gif
Normal file
After Width: | Height: | Size: 95 B |
BIN
games/tictac/shall13.gif
Normal file
After Width: | Height: | Size: 241 B |
BIN
games/tictac/shall14.gif
Normal file
After Width: | Height: | Size: 96 B |
BIN
games/tictac/shall15.gif
Normal file
After Width: | Height: | Size: 188 B |
BIN
games/tictac/shall2.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
games/tictac/shall3.gif
Normal file
After Width: | Height: | Size: 221 B |
BIN
games/tictac/shall4.gif
Normal file
After Width: | Height: | Size: 76 B |
BIN
games/tictac/shall5.gif
Normal file
After Width: | Height: | Size: 244 B |
BIN
games/tictac/shall6.gif
Normal file
After Width: | Height: | Size: 195 B |
BIN
games/tictac/shall7.gif
Normal file
After Width: | Height: | Size: 89 B |
BIN
games/tictac/shall8.gif
Normal file
After Width: | Height: | Size: 222 B |
BIN
games/tictac/shall9.gif
Normal file
After Width: | Height: | Size: 76 B |
BIN
games/tictac/sidebottom.gif
Normal file
After Width: | Height: | Size: 101 B |
BIN
games/tictac/sidetop.gif
Normal file
After Width: | Height: | Size: 103 B |
BIN
games/tictac/ticNEWGAME_off.gif
Normal file
After Width: | Height: | Size: 154 B |
BIN
games/tictac/ticNEWGAME_on.gif
Normal file
After Width: | Height: | Size: 154 B |
BIN
games/tictac/ticQUIT_off.gif
Normal file
After Width: | Height: | Size: 128 B |
BIN
games/tictac/ticQUIT_on.gif
Normal file
After Width: | Height: | Size: 128 B |
BIN
games/tictac/tie1.gif
Normal file
After Width: | Height: | Size: 211 B |
BIN
games/tictac/tie2.gif
Normal file
After Width: | Height: | Size: 78 B |
BIN
games/tictac/tie3.gif
Normal file
After Width: | Height: | Size: 231 B |
BIN
games/tictac/tie4.gif
Normal file
After Width: | Height: | Size: 89 B |
BIN
games/tictac/tie5.gif
Normal file
After Width: | Height: | Size: 213 B |
BIN
games/tictac/turn0.gif
Normal file
After Width: | Height: | Size: 369 B |
BIN
games/tictac/turn1.gif
Normal file
After Width: | Height: | Size: 589 B |
BIN
games/tictac/win1.gif
Normal file
After Width: | Height: | Size: 193 B |
BIN
games/tictac/win2.gif
Normal file
After Width: | Height: | Size: 80 B |
BIN
games/tictac/win3.gif
Normal file
After Width: | Height: | Size: 188 B |
BIN
games/tictac/win4.gif
Normal file
After Width: | Height: | Size: 88 B |
BIN
games/tictac/win5.gif
Normal file
After Width: | Height: | Size: 184 B |
BIN
games/tictac/x.gif
Normal file
After Width: | Height: | Size: 211 B |
BIN
games/tictac/x_lite.gif
Normal file
After Width: | Height: | Size: 209 B |