| |
|
|
H.Brill | Have time with the QCARD32.DLL played.
Download external Download
' Link to that Download : https://lbpe.wikispaces.com/QCard01
Declare lever qc, btn1, btn2, btn3, btn4, Text1, Text2
Declare Int end, knum, kwert, colour, deck, jolly, deck1[52], deck2[52], Deckblatt[5], Joker[4]
Declare String cardcolor
Def %CardWidth 71
Def %CardHeight 96
Def %NumCards 52
qc = ImportDll("QCard32.dll", "")
end = 0
Window Title "Karten with the QCARD32.DLL"
Window 840, 600
btn1 = @Create("Button", %HWnd, "Ende", 10, 10, 60, 25)
btn2 = @Create("Button", %HWnd, "Deal", 80, 10, 60, 25)
deck = InitializeDeck(%HWnd)
SetCurrentBack(4)
InitDecks()
Randomize
WhileNot end
WaitInput
If @Clicked(btn1)
end = 1
ElseIf @Clicked(btn2)
knum = Rnd(52)
jolly = Rnd(4)
SetCardStatus(deck1[knum], 1)
DealCard(%HWnd, deck1[knum], 100, 350)
DealCard(%HWnd, Joker[jolly], 10, 350)
kwert = GetCardValue(deck1[knum])
colour = GetCardSuit(deck1[knum])
Select colour
CaseOf 1 : cardcolor = "Kreuz"
CaseOf 2 : cardcolor = "Karo"
CaseOf 3 : cardcolor = "Herz"
CaseOf 4 : cardcolor = "Pik"
EndSelect
DrawText 200, 380, " "
DrawText 200, 380, "Farbe : " + cardcolor + ", worth : " + Str $(kwert)
EndIf
Case %Key = 2 : end = 1
EndWhile
FreeDll qc
End
Proc InitDecks
Declare Int z, x
WhileLoop 0, 51
deck1[&LOOP] = &LOOP + 1
deck2[&LOOP] = &LOOP + 53
EndWhile
z = 105
WhileLoop 0, 4
Deckblatt[&LOOP] = z
Inc z
EndWhile
z = 110
WhileLoop 0, 3
Joker[&LOOP] = z
Inc z
EndWhile
WhileLoop 0, 51
SetCardStatus(deck1[&LOOP], 0)
SetCardStatus(deck2[&LOOP], 0)
DrawCard(%HWnd, deck1[&LOOP], 5, 50)
EndWhile
x = 100
WhileLoop 0, 3
DrawCard(%HWnd, Joker[&LOOP], x, 50)
Inc x, 140
EndWhile
x = 10
WhileLoop 1, 10
DrawSymbol(%HWnd, 3, x, 250)
Inc x, 80
EndWhile
ENDPROC
shining right well To his. Downloadlink standing in the View source 1. row. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 06/14/15 ▲ |
|
|
|