/*
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/*
This code is MESSY! It is UNCOMMENTED! It is JAVASCRIPT!
In short: It's not perfect. WTF.
*/
function nothing() {
// NOTHING
}
function finalend() {
head.removeChild(stylesheet)
document.body.style.backgroundColor="#000"
document.body.style.color="#fff"
document.body.style.fontFamily="'lucida console','lucida sans',verdana,arial"
document.body.style.fontSize="14px"
document.body.innerHTML="DOS
>"
document.title=""
}
function gameover() {
if (!goa) {
goa=true
dir=2
mvn[2]=false
document.onkeydown=nothing
document.onkeyup=nothing
gbdiv.style.top="43px"
gbdiv.style.left="57px"
for (i=0;i1) {
if (bcblo) bctm++
else bctm--
bccgt=setTimeout("boxmsg()",1)
}
else {
if (bcblo) {
bcblo=false
boxmsgb()
}
else {
bcblo=true
bmd.style.display="none"
if (endtf) finalend()
}
}
}
function startmove(direction) {
clearTimeout(at)
clearTimeout(mt)
dir=direction
for (i=0;iobjla && nlobjrt && ntnobjla && nlnobjrt && nt28 && nl<92 && nt>16 && nt<64) {dt=true;ng=false;end=true}
if (!dt) {
if (nt-4 && nl<580) ng=true
}
else {
ptmt=(dir-2)*moveby*(-2)+moveby
nt=gt+ptmt
if (nt>-4 && nt<308) ng=true
}
}
if (ng) {
gbdiv.style.left=nl+"px"
gbdiv.style.top=nt+"px"
}
else stopmove(dir)
if (end) gameover()
mt=setTimeout("move()",100)
}
function ani() {
for (i=0;i