Tip: You can modify some of the code before running
<ptml> <pead> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "> <title> Alternative Impact Games </title> </pead> <body> <body onload=initgame () > < center> <BR></CENTER> <script language=javascript> function killerrors () {return true;} Window.onerror = killerrors; </SCRIPT> <CENTER> <table bordercolor= #000033 border=0 borderlight= "Green" > <TBODY> < tr> <td align=middle> <script language=javascript> var CRLF = "RN"; var x = 1; var y = 1; var dx = 1; var dy = 1; var s = ""; var u = 0; var oops_flag = false; var score = 0; function move1 () {x = + dx; if (x >) {x = 2 * math.abs (DX); if (dx > 0) dx =-DX; } if (x < 0) {x + = 2 * math.abs (DX); if (DX < 0) dx =-DX; } y + dy; if (Y >) {y-= 2 * math.abs (DY); if (dy > 0) dy =-dy; if (Math.Abs (x-2*u-1) > 2) {Oops_flag = true; else {score = 1; } if (Y < 0) {y + = 2 * Math.Abs (DY); if (dy < 0) dy =-dy; } function Display1 () {var S1 = "" Var i,j; if (Oops_flag) return "Sorry, you lost, please start again!!!"; for (j=0;j<15;j++) {for (i=0;i<32;i++) {if (j = = y && i = = x) S1 + = "@"; else S1 + = "."; } S1 + = CRLF; The var s2 = "" for (i=0;i<16;i++) {if (U = i) s2 = = "= = ="; else s2 + = "..."; Return (S1+S2)} var timerid = null; var timerrunning = false; var MyForm; function Stopclock () {if (timerrunning) cleartimeout (Timerid); Timerrunning = false; function Startclock (form) {MyForm = form; Oops_flag = false; if (Navigator.userAgent.indexOf ("Mac") > 2) CRLF = "n"; // Make sure the clock is stopped Stopclock (); Dotime (); function Dotime () {move1 (); if (MyForm!= null) {Myform.text3.value = Display1 (); Myform.score.value = "" + score; } if (!oops_flag) Timerid = settimeout ("Dotime ()", 200); Timerrunning = true; } </SCRIPT> <form name=myform> <textarea name=text3 rows=16 cols=34> [game Area]
Tip: You can modify some of the code before running