const testString : string := "Snakes+Ladders"
var width : int
var fontID : int
fontID := Font.New (":26:Bold,Italic")
width := Font.Width (testString, fontID)
Font.Draw (testString, 1, 1, fontID, black)
var x1 : int := 100
var x2 : int := 130
var y1 : int := 70
var y2 : int := 100
var c : int
for B : 1 .. 9
y1 := y1 + 30
y2 := y2 + 30
x1 := 100
x2 := 130
for A : 1 .. 9
x1 := x1 + 30
x2 := x2 + 30
randint (c, 2, 10)
drawfillbox (x1, y1, x2, y2, c)
end for
end for
drawarc (265, 330, 20, 20, 90, 270, red)
drawarc (267, 330, 22, 20, 90, 270, red)
drawarc (266, 330, 23, 20, 90, 270, red)
drawarc (261, 290, 22, 20, 270, 90, red)
drawarc (262, 290, 23, 20, 280, 90, red)
drawarc (251, 252, 22, 20, 56, 236, red)
drawarc (252, 252, 25, 20, 56, 236, red)
drawfilloval (115, 114, 12, 12, white)
var locx, locy, btn, rc : int
loop
mousewhere (locx, locy, btn)
if btn = 1
then
for i : 1 .. 100000
randint (rc,2,20)
end for
if locx > 130 and locx < 250 and locy > 100 and locy < 370
then
drawfilloval (locx, locy, 12, 12, white)
or if
locx>280 and locx<400 and locy>100 and locy<370
then
drawfilloval (locx, locy, 12, 12, white)
end if
end if
var locx2, locy2, btn2, rc2 : int
loop
mousewhere (locx2, locy2, btn2)
if btn2 = 1
then
for i : 1 .. 100000
end for
locate (1, 1)
randint (rc2, 250, 255)
if locx2 > 250 and locx2 < 279 and locy2 > 341 and locy2 < 368
then
drawfilloval (235, 235, 12, 12, white)
end if
end if
end loop
var mx, my, mbutton, mx1, my1 : int
mx1 := 100
my1 := 100
drawfilloval (mx1, my1, 12, 12, white)
loop
mousewhere (mx, my, mbutton)
if mx > mx1 - 12 and mx < mx1 + 12 and my > my1 - 12 and my < my1
+ 12 and mbutton = 1 then
drawfilloval (mx, my, 12, 12, white)
delay (10)
drawfilloval (mx, my, 12, 12, brightred)
end if
end loop
end loop |