Du bist nicht angemeldet.

#1 20.07.2004 12:27

skywatcher
Gast

Problem

Hy Leute,
ich versuche an meinem CFX-9850GB+ ein kleine Spiel (17+4) zu Prgrammieren. :unsure:
Dies ist nur ein kleiner Teil(ausschnitt)

Filename: 17+4

0→D
Lbl 0
Locate 1,1,”     “
Int 8Ran#+1→A
A=1B=”BUBE” And C=2
A=2B=”DAME” And C=3
A=3B=”KOENIG” And C=4
A=47→B~C
A=58→B~C
A=69→B~C
A=710→B~C
A=8B=”ASS” And C=11
C+D→D
Locate 1,1,B
Locate 7,1,D
Goto 0

 =>
→ ->

Problem: Ich möchte das Bube, Dame, ... auf dem Bild zu sehen ist. hammer

#2 20.07.2004 12:56

Ronny
Administrator
Ort: Chemnitz
Registriert: 08.11.2001
Beiträge: 11.704
Webseite

Re: Problem

Folgendes Beispiel duerfte Dir genuegend Erklaerung bringen... auch wenns ein BlackJack ist (hab kein 17&4 in meinem Casio-Archiv gefunden ;D, aber Blackjack funzt ja auch ;D

Cls
ViewWindow 1, 126, 1, 1, 64, 1
0->A~Z
Text 20, 44, "BLACK JACK"
While GetKey =/= 31
Text 30,44, "PUSH [EXE]"
Text 30,44, "             "        {13 spaces}
WhileEnd
Cls
1->Z
1->C
300->B
Plot 1, 8
Plot 125, 8
Line
For 1->A To 6
21A->C
Plot C, 1
Plot C, 8
Line
Next
Text 57, 3, "QUIT"
Text 57, 70, "+10"
Text 57, 48, "-10"
Text 57, 27, "BET"
Text 57, 91, "HIT"
Text 57, 108, "STAY"
Plot 123, 62
While Z=1
If (GetKey=69) And (P=0)
Then For 1->C to 50 Step 5
Text C, 1, "                           "       {27 spaces}
Next
0->D
Text 30, 20, "CURRENT BUDGET:"
Text 30, 90, B
Text 40, 20, "YOUR BET:"
Text 40, 60, D
Plot 1, 40
Plot 125, 40
Line
Text 10, 25, "[EXE] TO EXIT BET MENU"
Plot 1,1
1->E
Do
If GetKey=59
Then D-10->D
D<0->D+10->D
Text 40, 60, "                       "          {23 spaces}
Text 40, 60, D
IfEnd
If GetKey=49
Then D+10->D
D>B=>D-10->D
Text 40, 60, "                       "           {23 spaces}
Text 40, 60, D
IfEnd
GetKey=31 => 0->E
1->P
Plot 1,1
LpWhile E=1
5->A    {there was an extra Ifend here please take it out}
If P=1
Then For 1->C To 50 Step 5
Text C,1, "                                       "    {40 spaces}
Next
Text 20,1, "DEALER"
Int 10Ran#+1->M
Text 20, 30, M
Int 10Ran#+1->N
Text 20, 38, N
M+N->M
Text 40,1,"PLAYER"
Int 10Ran#+1->N
Text 40, 30, N
Int 10Ran#+1->O
Text 40, 38, O
Plot 1,1
N+O->O
48->Q
Do
If GetKey=39
Then Int 10Ran#+1->N
Text 40, Q, N
Plot 1, 1
8+Q->Q
N+O->O
O>21=>0->P
IfEnd
GetKey29=>4->P
LpWhile 1=P
If P=4  	{there was an extra IfEnd here please take it out}
Then 46->Q
While ((M<18) Or (M<O)) And (M<22)
Int 10Ran#+1->N
Text 20, Q, N
N+M->M
Q+8->Q
Plot 1,1
WhileEnd
0->P
O=M => Text 10,55,"PUSH"
Plot 1,1
If (O>M) Or <M>21)
Then 2D+B->B
Text 10,50,"YOU WIN"
Plot 1,1
IfEnd
IfEnd
If (O>21) Or ((O<M) And (M<22))
Then B-D->B
Text 10,50,"YOU LOSE"
Plot 1,1
IfEnd
0->M
0->O
GetKey=79=>0->Z
WhileEnd
B=<0 =>"---BANKRUPT---"


http://www.gamezworld.de/casio/


bye Ron


sigimg2.php?id=1

Offline

Schnellantwort auf dieses Thema

Schreibe deinen Beitrag und versende ihn
Bist Du ein Mensch oder ein Roboter ?

Verifizierung, dass diese Aktion durch eine reale Person vorgenommen wird und nicht von einem Programm.