Android application to keep nine ball using APA rules