Billiards "Engine" in Java