Adding logic game in html5 FIXED 3