Prev: 94C7 Up: Map Next: 94E8
94DA: Handler: Three Of A Kind
Used by the routines at CheckThreeOfAKind and Handler_FullHouse.
Table_CardDuplicates holds counts of duplicate values of cards, this routine specifically looks for three-of-a-kind matches.
Handler_ThreeOfAKind 94DA LD HL,$9540 HL=Table_CardDuplicates.
94DD LD B,$0D Set a counter in B of the number of possible values of cards there are in one suit.
There's no need to check any further if there's a match, as if there are 03 of any card value, there are only 05 cards in one hand - so there can't be a second match.
Handler_ThreeOfAKind_Loop 94DF LD A,(HL) Return if *HL is equal to 03.
94E0 CP $03
94E2 RET Z
94E3 INC HL Increment HL by one.
94E4 DJNZ Handler_ThreeOfAKind_Loop Decrease counter by one and loop back to Handler_ThreeOfAKind_Loop until counter is zero.
94E6 INC B Increment B by one.
94E7 RET Return.
Prev: 94C7 Up: Map Next: 94E8