A pure javascript billiard game