24 - POKER Arcade machine

Post Reply
Peet
Posts: 94
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

24 - POKER Arcade machine

Post by Peet »

The 24th program and last door on the advent calendar.
Christmas Eve is here. Merry Christmas everyone.

Inspired by the Arcade machine "Witchcard". You win with two pair or better after the 2nd deal.
First make your bet and deal. You get 5 cards (the flags 0 to 4 represet this cards).
You can hold cards (e.g. winning sets or "good hand" ) by clear the flag for this card (flag 0 stands for card 5).
Then you can draw new cards to replace those that were not held.
If you have a winning hand, you can make a 50:50 bet to double or lose your price.

<F> increase bet
<G>/<H> deal
<A>-<E> Delete FLAG 1 to 0 (hold card 1 to 5)
<I> set all FLAGs 0-4 (remove hold)
<J> new deal

Double or nothing: G:LO H:HI I:CO
<G> Low
<H> High
<I> Collect

Code: Select all

LBL "POKER"
SF 25
RCL 29
"SIZE 30"
FC? 25 
PROMPT	; stop if size < 30
FIX 0
SF 27
CF 29
10	
STO 12	; credit
LBL 40
CLX
STO 27
RCL 12
X=0?
GTO 41
LBL 17
"C="	; credit
ARCL 12
"|- B=" ; bet
ARCL 27
RCL 12
X=0?
GTO G
PROMPT
LBL F	; inc bet
1
ST+ 27
ST- 12
GTO 17
LBL G 	; deal
LBL H
XEQ I
XEQ 19
CF 05
CF 06
CF 07
CF 08
CF 09
CF 10
CF 12
CF 06
5
STO 11
LBL 01
CLA
XROM 26,36	; XEQ "ZZ" (Basics) or XROM 26,36 (TRNG - DM41X) or XROM 01,49 (RAN - DM42)
STO 00
52
*
1
+
INT		; ZZ between 1 and 52
RCL 02
X=Y?
GTO 01
RDN
RCL 03
X=Y?
GTO 01
RDN 
RCL 01
X=Y?
GTO 01 
RDN
RCL 04
X=Y? 
GTO 01
RDN
RCL 05 
X=Y?
GTO 01
RDN 
STO IND 11
FS? 06
GTO 03
DSE 11
GTO 01
LBL 03
RCL 01
XEQ 05
RCL 02 
XEQ 05
RCL 03
XEQ 05 
RCL 04
XEQ 05
RCL 05 
XEQ 05
FS? 06
RTN
SF 06
AVIEW
PSE
RTN 
LBL 19
"DEALING"
CLD
RCL d
AVIEW
PSE
STO d
RTN
LBL 05
40
X<=Y?
GTO 06
RDN
27
X<=Y?
GTO 07
RDN
14
X<=Y?
GTO 08
RDN
99
"|--"
GTO 09
LBL 06
RDN
39
-
"|-+"
R^
GTO 09
LBL 07
RDN
26
-
R^
"|-*"
GTO 09
LBL 08
RDN
13
-
R^
"|-/"
LBL 09
RDN
1
+
11
X=Y?
"|-B"
RDN
12
X=Y?
"|-D"
RDN
13
X=Y?
"|-K"
RDN
14
X=Y?
"|-A"
RDN
10
X<>Y
X<=Y?
ARCL X
"|-:"
RTN
LBL A
CF 01
PROMPT
LBL B
CF 02
PROMPT
LBL C
CF 03
PROMPT
LBL D
CF 04
PROMPT
LBL E
CF 00
PROMPT
LBL I	; clear all "hold"
SF 00
SF 01
SF 02 
SF 03
SF 04
AVIEW
PSE
RTN
LBL J
XEQ 19
CLA
FS?C 00
XEQ 02
FS?C 01
XEQ 04 
FS?C 02
XEQ 10
FS?C 03 
XEQ 11
FS?C 04
GTO 12
GTO 13
LBL 02
5
STO 11
XEQ 01
RTN
LBL 04
1
STO 11
XEQ 01
RTN
LBL 10
2
STO 11
XEQ 01
RTN
LBL 11
3
STO 11
XEQ 01
RTN
LBL 12
4
STO 11
XEQ 01 
LBL 13
AVIEW
CLX
STO 13
STO 14
STO 15
STO 16 
STO 17
STO 18
STO 19 
STO 20
STO 21
STO 22 
STO 23
STO 24
STO 25 
STO 26
CF 06
RCL 01
XEQ 20
RCL 02
XEQ 20 
RCL 03
XEQ 20
RCL 04
XEQ 20
RCL 05
XEQ 20 
RCL 13
5
X=Y?
SF 05
RDN
10
/
5
X=Y? 
SF 05
RDN
10
/
5
X=Y?
SF 05
RDN
10
/ 
5
X=Y?
SF 05
CLX
STO 29
14
LBL 21
RCL IND X
X=0?
GTO 22
SF 12
1
X=Y?
ST+ 29
RDN
RDN
RCL 29
5
X=Y?
SF 08
RDN
RDN
1
+
FS? 08
GTO 24
GTO 21
LBL 22
RDN
1
+
FS?C 12
GTO 23
GTO 21
LBL 23
14.027
STO 13
LBL 25
RCL IND 13
ISG 13
GTO 26
GTO 24
LBL 26
2
X>Y?
GTO 25
RDN
2
X=Y?
FS? 06
SF 10
X=Y?
SF 06
RDN
3
X=Y?
SF 07
RDN
4
X=Y?
SF 09
GTO 25
LBL 20
40
X<=Y?
GTO 14
RDN
27
X<=Y?
GTO 15
RDN
14
X<=Y?
GTO 16
RDN
13
+
1
ST+ IND Y
1
ST+ 13
RTN
LBL 14
RDN
26
-
1
ST+ IND Y
10
ST+ 13
RTN
LBL 15
RDN
13
-
1 
ST+ IND Y
1 E2
ST+ 13
RTN
LBL 16
RDN
1
ST+ IND Y
1 E3
ST+ 13
RTN
LBL 24
FS? 05
GTO 33
FS? 09
GTO 32
FS? 08
GTO 35 
FS? 07
GTO 36
FS? 10 
GTO 37
GTO 38 
LBL 31
"**FL**"
TONE 8
BEEP 
TONE 1
AVIEW
PSE
100
GTO 39
LBL 32
"**4**"
BEEP
AVIEW
PSE
30
GTO 39
LBL 33
FS? 08
GTO 31
"FLUSH" 
AVIEW
PSE
15
GTO 39
LBL 34
"HOUSE"
AVIEW
PSE
10 
GTO 39
LBL 35
"STR"
AVIEW
PSE
8
GTO 39
LBL 36
FS? 06
GTO 34
"*3*" 
AVIEW
PSE
5
GTO 39
LBL 37
"2PAIR"
AVIEW
PSE
2
GTO 39
LBL 38
"LOST"
TONE 2
AVIEW
PSE
GTO 40
LBL 39
TONE 9
TONE 9
TONE 9 
ST* 27
"|- "
ARCL 27
AVIEW
PSE
XROM 26,36	; XEQ "ZZ" (Basics) or XROM 26,36 (TRNG - DM41X) or XROM 01,49 (RAN - DM42)
STO 00
10		
*
1
+
INT		; ZZ between 1 and 10
STO 28
"G:LO H:HI I:CO" ; risc 50:50 - take a guess, if ZZ 1-5=low 6-10=high
PROMPT
LBL H	; high
RCL 28
VIEW X
PSE
6
X>Y?
GTO 38
2
GTO 39
LBL G	; low
RCL 28
VIEW X
PSE
6
X<=Y?
GTO 38
2
GTO 39
LBL I	; collect
RCL 27
ST+ 12
GTO 40
LBL 41
"GAME OVER"
AVIEW
SF 29
FIX 4
"(c)HPW"
END
Attachments
24_POKER.raw
(928 Bytes) Downloaded 15 times
24_Witchcard.jpg
24_Witchcard.jpg (18.58 KiB) Viewed 127 times
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(+), HP35S, DM41X, DM42
Post Reply