| |
|
|
H.Brill | Hab veces con el QCARD32.DLL gespielt.
Descargar externer Descargar
' Link para Descargar : https://lbpe.wikispaces.com/QCard01
Declarar Handle qc, btn1, btn2, btn3, btn4, texto1, texto2
Declarar Int ende, knum, kwert, farbe, deck, jolly, Deck1[52], Deck2[52], Deckblatt[5], Joker[4]
Declarar String cardcolor
Def %CardWidth 71
Def %CardHeight 96
Def %NumCards 52
qc = ImportDll("QCard32.dll", "")
ende = 0
Título de la ventana "Karten con el QCARD32.DLL"
Ventana 840, 600
btn1 = @Crear("Button", %HWnd, "Ende", 10, 10, 60, 25)
btn2 = @Crear("Button", %HWnd, "Deal", 80, 10, 60, 25)
deck = InitializeDeck(%HWnd)
SetCurrentBack(4)
InitDecks()
Selección aleatoria
Sinestar encargado ende
WaitInput
If @Clicked(btn1)
ende = 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])
farbe = GetCardSuit(Deck1[knum])
Select farbe
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 + ", Valor : " + Str$(kwert)
EndIf
Case %Key = 2 : ende = 1
EndWhile
FreeDll qc
End
Proc InitDecks
Declarar 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
Scheint bastante bien a ser. Downloadlink es en el Ver código fuente 1. Línea. |
|
|
| 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. | 14.06.2015 ▲ |
|
|
|