Prev: 94C1 Up: Map Next: 94DA
94C7: Handler: Straight
Used by the routines at CheckStraight and Handler_StraightFlush.
Handler_Straight 94C7 LD HL,$953F HL=953F (e.g. Table_CardDuplicates-01).
Keep looping through the duplicate values until we find a card which the player has only one of.
FindFirstCard_Loop 94CA INC HL Increment HL by one.
94CB LD A,(HL) Jump to FindFirstCard_Loop if *HL is not equal to 01.
94CC CP $01
94CE JR NZ,FindFirstCard_Loop
We've found the first card, so check if there's a sequence from here.
94D0 LD B,$05 Set a counter in B we want to check all 05 cards.
If it's a genuine straight, then the count for all five cards will be 01.
Handler_Straight_Loop 94D2 LD A,(HL) Return if the duplicate count is anything other than 01.
94D3 CP $01
94D5 RET NZ
94D6 INC HL Increment HL by one.
94D7 DJNZ Handler_Straight_Loop Decrease the card counter by one and loop back to Handler_Straight_Loop until all 05 cards have been checked.
94D9 RET Return.
Prev: 94C1 Up: Map Next: 94DA