Adding logic game in html5