Two-color ball calculation bonus algorithm