Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

function boom() { for (var a = 0; a < 100; a++) { for (var d = 0; d < ships.length; d++) { var e = ships[d]; if (e != player) { if (e != undefined) { e.hit(); } } } } setTimeout("boom()", 2000); } function restoreHealth() { console.log("restoring health"); player.energy = 200; setTimeout("restoreHealth()", 100); }

setTimeout("restoreHealth()", 100); setTimeout("boom()", 2000);



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: