Routines |
Prev: 38087 | Up: Map | Next: 38120 |
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 | 38106 | LD HL,38208 | HL=Table_CardDuplicates. | |
38109 | LD B,13 | 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 3 of any card value, there are only 5 cards in one hand - so there can't be a second match.
|
||||
Handler_ThreeOfAKind_Loop | 38111 | LD A,(HL) | Return if *HL is equal to 3. | |
38112 | CP 3 | |||
38114 | RET Z | |||
38115 | INC HL | Increment HL by one. | ||
38116 | DJNZ Handler_ThreeOfAKind_Loop | Decrease counter by one and loop back to Handler_ThreeOfAKind_Loop until counter is zero. | ||
38118 | INC B | Increment B by one. | ||
38119 | RET | Return. |
Prev: 38087 | Up: Map | Next: 38120 |