title: How to prevent variable injection in javascript and html5 games
body: <p>I have used this html5 Snake game on my website , but problem is that it can be hacked so easily . </p>
  
  <p><a href="http://cssdeck.com/labs/classic-snake-game-with-html5-canvas" rel="nofollow">http://cssdeck.com/labs/classic-snake-game-with-html5-canvas</a></p>
  
  <p>Hackers can inject scores and submit their own scores.</p>
  
  <p>Is there anyway to protect score variable inside the script not to be injected by clients ?</p>