Adding logic game in html5 FIXED 4