English
Source / code snippets

to determine Zufallszahlen

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Zufallszahlen bestimmen
declare a%,b%
def @Pause(1) !kernel32,Sleep
window 50,50-400,400
SetTrueColor 1
randomize

proc Zufall

    let b%=0
    let a%=@add(@rnd(2),20)

    while @lt(b%,a%)

        if @mod(b%,2)

            usebrush 1,rgb(255,0,0)
            ellipse 100,100-150,150
            usebrush 1,rgb(255,255,255)
            ellipse 200,100-250,150

        else

            usebrush 1,rgb(0,255,0)
            ellipse 200,100-250,150
            usebrush 1,rgb(255,255,255)
            ellipse 100,100-150,150

        endif

        inc b%
        playsound Click.wav,1
        @Pause(@mul(b%,20))

    endwhile

    if mod(b%,2)

        print Grün gewinnt

    else

        print Rot gewinnt

    endif

endproc

while 1

    print <Enter>
    waitkey
    cls
    Zufall

endwhile

 
07/15/07  
 



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

1.536 Views

Untitledvor 0 min.
RudiB.04/20/21
GDL08/25/16
PETER195602/11/16
RICOSCH08/12/14
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (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