Making a game using JS