fix subtle auto-move bug
This commit is contained in:
parent
c0443e0b03
commit
aa836737fb
BIN
kodiak.rom
BIN
kodiak.rom
Binary file not shown.
15
kodiak.tal
15
kodiak.tal
|
@ -1069,12 +1069,25 @@
|
|||
@min ( x^ y^ -> min[x,y]^ )
|
||||
LTHk JMP SWP POP JMP2r
|
||||
|
||||
( to automatically move a card, we need to know that )
|
||||
( the alternate suits are both within 2 of its face )
|
||||
( value, and that its "parallel" suit is within 3 )
|
||||
( )
|
||||
( for example, its not safe to auto-play 4h if it )
|
||||
( might be needed for 3s, 3c, or 2d. )
|
||||
@check-auto ( card^ -> ok^ )
|
||||
DUP #30 AND ( card^ suit^ )
|
||||
#04 SFT .auto ADD LDZ INC ( card^ base+1^ )
|
||||
OVR #0f AND EQU ?&ok ( card^ ; base+1=face? )
|
||||
POP #00 JMP2r ( 0^ )
|
||||
&ok DUP #30 AND ( card^ suit^ )
|
||||
&ok ( card^ suit^ )
|
||||
DUP #30 AND ( card^ )
|
||||
#04 SFT INC INC #03 AND ( card^ par^ )
|
||||
.auto ADD LDZ #04 ADD ( card^ pface+4^ )
|
||||
OVR #0f AND GTH ?&ok2 ( card^ )
|
||||
POP #00 JMP2r ( 0^ )
|
||||
&ok2 ( card^ )
|
||||
DUP #30 AND ( card^ suit^ )
|
||||
#04 SFT INC #03 AND ( card^ alt1^ )
|
||||
INCk INC #03 AND ( card^ alt1^ alt2^ )
|
||||
.auto ADD LDZ SWP ( card^ face2^ alt1^ )
|
||||
|
|
Loading…
Reference in New Issue