Game logic using Leap motion JS API

All the magic happens here!!