Closed FaisalAlwazir closed 4 years ago
This is how it works: let's assume you have (A,2,3,4,5,J,J,J,Q) first group is calculated like this: A,2,3 :heavy_check_mark: A,2,3,4 :heavy_check_mark: A,2,3,4,5 :heavy_check_mark: A,2,3,4,5,J :x:
First group = A,2,3,4,5
second group is calculated like this: J,J,J :heavy_check_mark: J,J,J,Q :x:
Second group = J,J,J
gotta respect the tests. nice work man
If you check the new tests that were created in c660d19ad4597160730db5ef1e5d6996391f93e5 you'll understand the problem with creating groups from left to right.
Grouping is now achieved through the
validate
function in models/groups.dart. It returns a list of Meld objects of the possible outcomes, arranged by penalty value. In the case of no possible outcomes, the function returns an empty list.