Testing Javascript for a minigame