alnah005 / Konkan

Flutter game that is popular in my home country (Yemen)
1 stars 0 forks source link

Connect grouping to UI #35

Closed FaisalAlwazir closed 4 years ago

FaisalAlwazir commented 4 years ago

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.

alnah005 commented 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
FaisalAlwazir commented 4 years ago

gotta respect the tests. nice work man

alnah005 commented 4 years ago

If you check the new tests that were created in c660d19ad4597160730db5ef1e5d6996391f93e5 you'll understand the problem with creating groups from left to right.