A template for a web browser JavaScript game