English
Source / code snippets

cards play

 

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  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.346 Views

Untitledvor 0 min.
Gast.0815Gestern (17:41)
Member 862464105/12/24
p.specht11/20/21
Uwe Lang11/20/21
More...

Themeninformationen

this Topic has 1 subscriber:

H.Brill (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie