1
mirror of https://github.com/jakejarvis/my-first-website.git synced 2025-09-18 12:25:32 -04:00

first commit

This commit is contained in:
2013-05-05 17:56:42 -04:00
commit 1fe4d45603
106 changed files with 2210 additions and 0 deletions

16
games/3dgame.html Normal file
View File

@@ -0,0 +1,16 @@
<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>

BIN
games/battleship/batt1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

BIN
games/battleship/batt10.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

BIN
games/battleship/batt2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

BIN
games/battleship/batt3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

BIN
games/battleship/batt4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

BIN
games/battleship/batt5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

BIN
games/battleship/batt6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

BIN
games/battleship/batt7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

BIN
games/battleship/batt8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

BIN
games/battleship/batt9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

339
games/battleship/index.html Normal file
View File

@@ -0,0 +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<6D>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>

355
games/connect.html Normal file
View File

@@ -0,0 +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>

BIN
games/cwkit.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

8
games/cwkit.htm Normal file
View File

@@ -0,0 +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>

49
games/fortune.html Normal file
View File

@@ -0,0 +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>

244
games/hangman.html Normal file
View File

@@ -0,0 +1,244 @@
<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>

148
games/math.html Normal file
View File

@@ -0,0 +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>

BIN
games/memory/image0.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

BIN
games/memory/image1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/memory/image10.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
games/memory/image11.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/memory/image12.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
games/memory/image13.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
games/memory/image14.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
games/memory/image15.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
games/memory/image16.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
games/memory/image17.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/memory/image18.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/memory/image2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/memory/image3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/memory/image4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
games/memory/image5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
games/memory/image6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
games/memory/image7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
games/memory/image8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
games/memory/image9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

133
games/memory/index.html Normal file
View File

@@ -0,0 +1,133 @@
<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>

BIN
games/pacman/FChemin.class Normal file

Binary file not shown.

BIN
games/pacman/FPanic.class Normal file

Binary file not shown.

BIN
games/pacman/FZombie.class Normal file

Binary file not shown.

BIN
games/pacman/Game.class Normal file

Binary file not shown.

Binary file not shown.

BIN
games/pacman/Laby.class Normal file

Binary file not shown.

BIN
games/pacman/PacAlive.class Normal file

Binary file not shown.

BIN
games/pacman/PacDead.class Normal file

Binary file not shown.

BIN
games/pacman/PacMan.class Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
games/pacman/PacPoint.class Normal file

Binary file not shown.

BIN
games/pacman/Place.class Normal file

Binary file not shown.

BIN
games/pacman/Position.class Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
games/pacman/State.class Normal file

Binary file not shown.

Binary file not shown.

BIN
games/pacman/fruiteat.au Normal file

Binary file not shown.

BIN
games/pacman/ghosteat.au Normal file

Binary file not shown.

BIN
games/pacman/ghosteat2.au Normal file

Binary file not shown.

BIN
games/pacman/interm.au Normal file

Binary file not shown.

BIN
games/pacman/killed.au Normal file

Binary file not shown.

15
games/pacman/pac.html Normal file
View File

@@ -0,0 +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>

BIN
games/pacman/pacchomp.au Normal file

Binary file not shown.

44
games/pacman/pacman.php Normal file
View File

@@ -0,0 +1,44 @@
<?
/*
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(); ?>

19
games/pacman/pacman.txt Normal file
View File

@@ -0,0 +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

BIN
games/pacman/pacman2.au Normal file

Binary file not shown.

BIN
games/pacman/pacman98.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
games/pacman/pacmaze1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
games/pacman/pacstart.au Normal file

Binary file not shown.

BIN
games/pacman/pactitle.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

182
games/puzzle.html Normal file
View File

@@ -0,0 +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>

25
games/tictac.html Normal file
View File

@@ -0,0 +1,25 @@
<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>