274274 @checkErrors
275275 UNTIL OK =1
276276
277-
278277 REPEAT ' loop until the game starts
279278 if Time >500
280279 @readGameState
293292 ENDIF
294293 if playerStatus (PlayerIndex )<>1
295294 @readGameState
296- @DrawGameState
295+ @DrawGameState
297296 ENDIF
298297 @ReadKeyPresses
299298 if GameStatus (tablenumber )=4 then @ShowResults
@@ -446,16 +445,20 @@ PROC ReadKeyPresses
446445 @CheckVaildMove K
447446 @ClearKeyQueue
448447 EliF K =193 AND GameStatus (tablenumber )=2
448+ @GoodBeep
449449 @StartGame
450450 @readGameState
451451 @ClearKeyQueue
452452 Elif K =237
453453 @CycleColorTheme
454454 Elif K =198
455+ @GoodBeep
455456 @DisplayHelpDialog
456457 Elif K =213
458+ @GoodBeep
457459 @AskSure 1
458460 Elif K =208
461+ @GoodBeep
459462 @AskSure 2
460463 ENDIF
461464ENDPROC
@@ -486,10 +489,31 @@ PROC CheckVaildMove _move
486489 ENDIF
487490 Next a
488491 if Move$<>" "
489- @GoodBeep
490- @POS 1 ,24 : @Print &" PLAYED MOVE: "
492+ @GoodBeep
493+ @POS 1 ,24 : @Print &" "
494+ @POS 1 ,24 : @Print &PlayerName $(PlayerIndex )
495+ @POS Len (PlayerName $(PlayerIndex ))+1 ,24 :@Print &" PLAYED A "
496+ if move$=" 1"
497+ @Print &" ONE"
498+ elif move$=" 2"
499+ @Print &" TWO"
500+ elif move$=" 3"
501+ @Print &" THREE"
502+ elif move$=" 4"
503+ @Print &" FOUR"
504+ elif move$=" 5"
505+ @Print &" FIVE"
506+ elif move$=" 6"
507+ @Print &" SIX"
508+ elif move$=" 7"
509+ @Print &" LLAMA"
510+ elif move$=" D"
511+ @POS Len (PlayerName $(PlayerIndex ))+1 ,24 :@PrintUpper &" drew a card from the deck"
512+ elif move$=" F"
513+ @POS Len (PlayerName $(PlayerIndex ))+1 ,24 :@Print &" FOLDED "
514+ ENDIF
491515 @PlayMove
492- @readGameState
516+ playerStatus ( PlayerIndex )= 0
493517 ELSE
494518 @BadBeep
495519 ENDIF
@@ -923,20 +947,23 @@ PROC DrawMainPlayerHand _Index
923947 XX =((36 -(PlayerHandCount (DisplayIndex )*4 ))/2 )+2
924948 for a =1 to len (PlayerHand $(DisplayIndex ))
925949 card =VAL (PlayerHand $(DisplayIndex )[a,1 ])
950+ if playerStatus (DisplayIndex )=2 then card =8 ' if folded show back of card
926951 @DrawCard XX,YY ,card
927952 XX =XX +4
928953 next a
929954 elif PlayerHandCount (DisplayIndex )<10 ' more than 8 cards so print cards closer together
930955 XX =((36 -(PlayerHandCount (DisplayIndex )*3 ))/2 )+2
931956 for a =1 to len (PlayerHand $(DisplayIndex ))
932957 card =VAL (PlayerHand $(DisplayIndex )[a,1 ])
958+ if playerStatus (DisplayIndex )=2 then card =8 ' if folded show back of card
933959 @DrawCard XX,YY ,card
934960 XX =XX +3
935961 next a
936962 else ' more than 10 cards so print even closer together
937963 XX =((36 -(PlayerHandCount (DisplayIndex )*2 )+1 )/2 )+2
938964 for a =1 to len (PlayerHand $(DisplayIndex ))
939965 card =VAL (PlayerHand $(DisplayIndex )[a,1 ])
966+ if playerStatus (DisplayIndex )=2 then card =8 ' if folded show back of card
940967 @DrawCard XX,YY ,card
941968 XX =XX +2
942969 next a
@@ -1119,10 +1146,12 @@ PROC DrawPlayers
11191146 @POS X +Xoffset ,YPOS (SLOT ): @Print &" :"
11201147 @POS X +Xoffset +1 ,YPOS (SLOT ): @PrintVal PlayerStatus (a )
11211148 @DrawPlayerScore X +Xoffset +2 ,YPOS (SLOT ),PlayerBlackTokens (a ),PlayerWhiteTokens (a )
1149+ folded =0
1150+ if playerStatus (a )=2 then folded =128
11221151 if slot =2
1123- @DrawPlayerHand XPOS (SLOT )+((38 -(PlayerHandCount (a )+2 ))/2 ),YPOS (SLOT )+2 ,PlayerHandCount (a )
1152+ @DrawPlayerHand XPOS (SLOT )+((38 -(PlayerHandCount (a )+2 ))/2 ),YPOS (SLOT )+2 ,PlayerHandCount (a ), folded
11241153 else
1125- @DrawPlayerHand XPOS (SLOT )+((14 -(PlayerHandCount (a )+2 ))/2 ),YPOS (SLOT )+2 ,PlayerHandCount (a )
1154+ @DrawPlayerHand XPOS (SLOT )+((14 -(PlayerHandCount (a )+2 ))/2 ),YPOS (SLOT )+2 ,PlayerHandCount (a ), folded
11261155 ENDIF
11271156 endif
11281157 inc SLOT
@@ -1131,13 +1160,13 @@ PROC DrawPlayers
11311160 if PlayerHandCount (playerIndex )>0 then @DrawMainPlayerHand Playerindex
11321161ENDPROC
11331162
1134- PROC DrawPlayerHand _col _row _numCards
1163+ PROC DrawPlayerHand _col _row _numCards _folded
11351164 if _numCards =0 then exit
1136- XXX =_col :YYY =_row
1165+ XXX =_col :YYY =_row : folded = _folded
11371166 if _numCards >12 then _numCards =12
11381167 for i =1 to _numCards
1139- @POS (XXX +i )-1 ,YYY :@PrintByte 13 :@PrintByte 14
1140- @POS (XXX +i )-1 ,YYY +1 :@PrintByte 15 :@PrintByte 27
1168+ @POS (XXX +i )-1 ,YYY :@PrintByte 13 + folded :@PrintByte 14 + folded
1169+ @POS (XXX +i )-1 ,YYY +1 :@PrintByte 15 + folded :@PrintByte 27 + folded
11411170 next i
11421171ENDPROC
11431172
0 commit comments