Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Auto-play algorithm in action for my single-HTML-page invaders game (susam.net)
1 point by susam 7 months ago | hide | past | favorite | 1 comment



The entire game is written as a single HTML page, so using the "View Page Source" feature (if available) of your web browser shows the entire source code of this game. The auto-play algorithm is present in the function named autoMove(). It is about 100 lines of code that decides the next move of the player.

Direct link to the autoMove() source code: https://github.com/susam/invaders/blob/0.9.0/invaders.html#L...




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

Search: