% Mr. M

% January 8, 2001

% Graphic dice roll simulation

var rolls,number:int

randomize

setscreen("graphics:v16")

locate(22,31)

put "Enter number of rolls: "..

get rolls

for i:1..rolls

randint(number,1,6)

locate(22,31)

put "Rolls: ",i, " Number: ",number

if (number=1) then

drawfillbox(270,190,370,290,15)

drawfilloval(320,240,5,5,0)

end if

if (number=2) then

drawfillbox(270,190,370,290,15)

drawfilloval(280,200,5,5,0)

drawfilloval(360,280,5,5,0)

end if

if (number=3) then

drawfillbox(270,190,370,290,15)

drawfilloval(280,200,5,5,0)

drawfilloval(360,280,5,5,0)

drawfilloval(320,240,5,5,0)

end if

if (number=4) then

drawfillbox(270,190,370,290,15)

drawfilloval(280,200,5,5,0)

drawfilloval(360,280,5,5,0)

drawfilloval(280,280,5,5,0)

drawfilloval(360,200,5,5,0)

end if

if (number=5) then

drawfillbox(270,190,370,290,15)

drawfilloval(280,200,5,5,0)

drawfilloval(360,280,5,5,0)

drawfilloval(280,280,5,5,0)

drawfilloval(360,200,5,5,0)

drawfilloval(320,240,5,5,0)

end if

if (number=6) then

drawfillbox(270,190,370,290,15)

drawfilloval(280,200,5,5,0)

drawfilloval(360,280,5,5,0)

drawfilloval(280,280,5,5,0)

drawfilloval(360,200,5,5,0)

drawfilloval(280,240,5,5,0)

drawfilloval(360,240,5,5,0)

end if

delay(100)

end for

Hosted by www.Geocities.ws

1