Scramble game in HTML5