A simple Black Jack game in linux.
If you are interested in the history of poker, click below links.
Reference:
Program output as below.
~/workspace/poker$ ./myBJ 1 2
m_magic = 37
====== Poker in Sequence (no shuffle) ===================
S(Spades), H(Hearts), D(Diamonds), C(Clubs), A(1), X(10).
SA S2 S3 S4 S5 S6 S7 S8 S9 SX SJ SQ SK
HA H2 H3 H4 H5 H6 H7 H8 H9 HX HJ HQ HK
DA D2 D3 D4 D5 D6 D7 D8 D9 DX DJ DQ DK
CA C2 C3 C4 C5 C6 C7 C8 C9 CX CJ CQ CK
===== {0.0} SPECIAL GLASSES {S.A} =====
DA HA DQ CA CX C2 S5 SX S4 DJ H5 H7 HJ
HQ HX H2 H9 C3 H6 C8 C9 SK C7 CJ S2 S8
C6 H4 C5 H3 DK H8 S9 S7 C4 D7 D5 S3 SA
D8 D3 HK D4 CK S6 SJ SQ D6 CQ D2 D9 DX
===== {0.0} SPECIAL GLASSES {S.A} =====
Dispatch initial cards for dealer and players ...
Dealer Card [1] = C4
Player [1] Card [1] = D7
Dealer Card [2] = **
Player [1] Card [2] = S3
Player [1] has D7 S3
Player [1] now [10]... one more card ? (y/n) Player [1] has D7 S3 SA
Player [1] now [11]... one more card ? (y/n) Player [1] has D7 S3 SA D8
Player [1] now [19]... one more card ? (y/n)
Dealer [0] has C4 D5
Dealer [0] now [9]... one more card ? (y/n) Dealer [0] has C4 D5 D3
Dealer [0] now [12]... one more card ? (y/n) Dealer [0] has C4 D5 D3 HK
*** Exceed 21 pts (22) *** YOU LOSE !
Dealer [0] got [22] pts | C4 D5 D3 HK
Player [1] got [19] pts | D7 S3 SA D8
Press 'q' to exit game .
Dispatch initial cards for dealer and players ...
Dealer Card [1] = D4
Player [1] Card [1] = CK
Dealer Card [2] = **
Player [1] Card [2] = SJ
Player [1] has CK SJ
Player [1] now [20]... one more card ? (y/n)
Dealer [0] has D4 S6
Dealer [0] now [10]... one more card ? (y/n) Dealer [0] has D4 S6 SQ
Dealer [0] now [20]... one more card ? (y/n)
Dealer [0] got [20] pts | D4 S6 SQ
Player [1] got [20] pts | CK SJ
Press 'q' to exit game .
*** G A M E - O V E R ***
沒有留言:
張貼留言