This is the basic framework for the JS game.