Version 1.3 final (to be released with 1.10)
This commit is contained in:
parent
e0588cd7c6
commit
2fe5f6b0a2
|
@ -13,6 +13,8 @@
|
||||||
// - Fixed a few display bugs
|
// - Fixed a few display bugs
|
||||||
// - Now saves your money between sessions
|
// - Now saves your money between sessions
|
||||||
// - Added Top 10 list
|
// - Added Top 10 list
|
||||||
|
// - Added command line option RESET to reset scores
|
||||||
|
// - Added command line option TOP10 to show top 10 and exit
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
|
@ -138,7 +140,7 @@ Begin
|
||||||
fReadRec (F, OnePerson);
|
fReadRec (F, OnePerson);
|
||||||
|
|
||||||
For Count2 := 1 to 10 Do
|
For Count2 := 1 to 10 Do
|
||||||
If TopList[Count2].Cash < OnePerson.Cash Then Begin
|
If TopList[Count2].Cash <= OnePerson.Cash Then Begin
|
||||||
For Count3 := 10 DownTo Count2 + 1 Do
|
For Count3 := 10 DownTo Count2 + 1 Do
|
||||||
TopList[Count3] := TopList[Count3 - 1]
|
TopList[Count3] := TopList[Count3 - 1]
|
||||||
|
|
||||||
|
@ -152,8 +154,8 @@ Begin
|
||||||
|
|
||||||
ClrScr;
|
ClrScr;
|
||||||
|
|
||||||
GotoXY (24, 3);
|
GotoXY (21, 3);
|
||||||
Write ('|07Mystic BlackJack - Top 10 Players');
|
Write ('|07Mystic BlackJack - Top 10 Money Holders');
|
||||||
|
|
||||||
GotoXY (5, 6);
|
GotoXY (5, 6);
|
||||||
Write ('## User Date Cash');
|
Write ('## User Date Cash');
|
||||||
|
@ -458,14 +460,24 @@ Begin
|
||||||
|
|
||||||
DataPath := JustPath(ProgName);
|
DataPath := JustPath(ProgName);
|
||||||
|
|
||||||
// RESET to reset scores
|
If Upper(ParamStr(1)) = 'TOP10' Then Begin
|
||||||
// TOPLIST to show only scores and exit
|
ExecuteTopTen;
|
||||||
|
Halt;
|
||||||
|
End;
|
||||||
|
|
||||||
|
If Upper(ParamStr(1)) = 'RESET' Then Begin
|
||||||
|
FileErase(DataPath + 'blackjack.ply');
|
||||||
|
WriteLn ('|CRScores have been reset|CR|CR|PA');
|
||||||
|
End;
|
||||||
|
|
||||||
Randomize;
|
Randomize;
|
||||||
DeckCreate;
|
DeckCreate;
|
||||||
LoadPlayer;
|
LoadPlayer;
|
||||||
|
|
||||||
DispFile (DataPath + 'blackjack')
|
DispFile (DataPath + 'blackjack')
|
||||||
|
WriteXY (12, 23, 8, 'Mystic BlackJack v' + Version + ' Code: g00r00 Art: Grymmjack');
|
||||||
|
|
||||||
|
DrawCash;
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
Print (' |15Want to play a game?', ' |10(|14Y|02/|14N|10)|08: |07')
|
Print (' |15Want to play a game?', ' |10(|14Y|02/|14N|10)|08: |07')
|
||||||
|
@ -567,6 +579,7 @@ Begin
|
||||||
DrawCard (1, 2, 1, 6);
|
DrawCard (1, 2, 1, 6);
|
||||||
Dealer_Hidden := 0;
|
Dealer_Hidden := 0;
|
||||||
UpdateScores;
|
UpdateScores;
|
||||||
|
|
||||||
While Dealer_Score < Player_Score and Dealer_Score < 22 and Dealer_Cards < 5 Do Begin
|
While Dealer_Score < Player_Score and Dealer_Score < 22 and Dealer_Cards < 5 Do Begin
|
||||||
GetNewCard(True);
|
GetNewCard(True);
|
||||||
UpdateScores;
|
UpdateScores;
|
||||||
|
@ -593,7 +606,7 @@ Begin
|
||||||
ReadKey;
|
ReadKey;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
AdjustScore(2);
|
AdjustScore(2);
|
||||||
Print(' |12Push. Dealer wins.', ' Press a key.');
|
Print(' |12Push. No winner.', ' Press a key.');
|
||||||
ReadKey;
|
ReadKey;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue