Javascript - SVG - game