4 ms·
Show HN: While waiting for connecting flight, made this JS game
TLDR; http://veerasundar.com/rock-paper-scissor-lizard-spoc/
Today I had to wait at Singapore Airport for my connecting flight to Chennai. So, used the time to make this little JavaScript game in ~3 hours.
Here's the source code: https://github.com/vraa/rpsls (of course, lot of cleaning to do :) )
- danialtz 13y agoI guess there is a problem with math.random(), since every time I played I either won or was a draw. A better seeding, maybe? Sweet little game/code.
- v33ra 13y agowhile testing, I did see few bot wins.. but, yeah, the bot logic could be optimized.
- kaliblack 13y agoNice work. The results were random enough. I'd recommend removing the need to click the retry button to reset.
- v33ra 13y agoI had to show the result of the game to the player before starting the next game. so, added the retry button. but I can add a count down timer (may be 3 seconds) after which the retry button will be auto-clicked.