All pastes #958918 Raw Edit

HockeyInJune

public javascript v1 · immutable
#958918 ·published 2008-03-27 00:20 UTC
rendered paste body
<!--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Whack A MoleWritten In XHTML 1.0 Strict, JavaScriptVersion 0.0  2008/3/24  2008/3/26Copyright 2008 HockeyInJuneReleased as Free and Open Source Software Under GNU General Public License Version 3***HockeyInJuneEMAIL:	HockeyInJune@gmail.comAIM:	HockeyInJuneMSN:	HockeyInJune@gmail.comXMPP:	HockeyInJune@gmail.comICQ:	220525670 (HockeyInJune)YIM:	HockeyInJune////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Whack A Mole is Free Software.You can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.Whack A Mole is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program.If not, see http://www.gnu.org/licenses/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////-->function start() {	setTimeout("extendMole(1);", Math.random() * 10000 + 1);	setTimeout("extendMole(2);", Math.random() * 10000 + 1);	setTimeout("extendMole(3);", Math.random() * 10000 + 1);	setTimeout("extendMole(4);", Math.random() * 10000 + 1);	setTimeout("extendMole(5);", Math.random() * 10000 + 1);	setTimeout("extendMole(6);", Math.random() * 10000 + 1);	setTimeout("extendMole(7);", Math.random() * 10000 + 1);	setTimeout("extendMole(8);", Math.random() * 10000 + 1);	setTimeout("extendMole(9);", Math.random() * 10000 + 1);	setTimeout("extendMole(10);", Math.random() * 10000 + 1);	setTimeout("extendMole(11);", Math.random() * 10000 + 1);	setTimeout("extendMole(12);", Math.random() * 10000 + 1);}function extendMole(MoleID) {	if (Math.random() < .1) {		document.getElementById("Mole" + MoleID).src = "Mudk.png";	} else {		document.getElementById("Mole" + MoleID).src = "Mole.jpg";	}	setTimeout("retractMole(" + MoleID + ");", Math.random() * 2750 + 301);}function retractMole(MoleID) {	document.getElementById("Mole" + MoleID).src = "Hole.png";	setTimeout("extendMole(" + MoleID + ");", Math.random() * 10000 + 1);}function click(MoleID) {	if (document.getElementById("Mole" + MoleID).src.substring(document.getElementById("Mole" + MoleID).src.length - 8, document.getElementById("Mole" + MoleID).src.length) == "Mole.jpg") {		document.getElementById("score").innerHTML = parseInt(document.getElementById("score").innerHTML) + 1;	} else if (document.getElementById("Mole" + MoleID).src.substring(document.getElementById("Mole" + MoleID).src.length - 8, document.getElementById("Mole" + MoleID).src.length) == "Hole.png") {		document.getElementById("score").innerHTML = parseInt(document.getElementById("score").innerHTML) - 1;	} else if (document.getElementById("Mole" + MoleID).src.substring(document.getElementById("Mole" + MoleID).src.length - 8, document.getElementById("Mole" + MoleID).src.length) == "Mudk.png") {		document.getElementById("score").innerHTML = parseInt(document.getElementById("score").innerHTML) + 100;	}	retractMole(MoleID);}