Closed alnah005 closed 4 years ago
is there anyway to recreate the bug within tests?
is there anyway to recreate the bug within tests?
Yea just have a group of what I have in the photo and set it to player.cards and then call player.setCards(51), you'll see the cards were set and open.cards would contain the group.
I think you should check the playing card penalty values. I put them as 52 for jokers (because that's the penalty you get if the game is done and you have it in your hand)
i printed out the values of a meld inside tests
A suit meld worth 40 with cards: JKR Q♢ Q♥ Q♧
it says its penaltyval is 40 so I dont think the issue is with the joker having a penalltyVal of 52
are you using the meld.penalty property to get the penalty value of set cards? if so could you point out the code that does that?
oh yes there is a bug.
found the error. groups.dart line 211
groupType, remainingSuits.toList()[1], jokerPositions[1]);
instead of
groupType, remainingSuits.toList()[1], jokerPositions[0]);
haha
Weird bug with getting the group score. Bot was able to set groups with only one group of 4s.