'idea, based on SierraKen's Circle maze and Bplus's upgrade
Circles = 13
StepsToCircle = 50
C
(Fill
).Wall
= C
(Fill
).
Exit - _PI(2) / 8 - _PI(2) / 50 * (RND * 50) C(Fill).Radius = 30 * Fill
C
(Fill
).Kolor
= 20 + RND * 75
B = Ball
Xb = 400
Yb = 413
memY = 400
Level = 1
PB Xb, Yb
radius = C(D).Radius
Doo
= _PI(2) / StepsToCircle
Doors
= _PI(2) / radius
* 4 W = C(D).Wall
RotP = RotP + .005
X1
= 400 + COS(K
+ RotP
) * radius
Y1
= 400 + SIN(K
+ RotP
) * radius
X2
= 400 + COS(K
+ Doo
+ RotP
) * radius
Y2
= 400 + SIN(K
+ Doo
+ RotP
) * radius
LINE (X1
, Y1
)-(X2
, Y2
), C
(D
).Kolor
'calculate door line
Crad = C(K).Radius
D30
= (_PI(2) / Crad
) * 4 KX1
= 400 + COS(C
(K
).
Exit + D30
+ RotP
) * Crad
KY1
= 400 + SIN(C
(K
).
Exit + D30
+ RotP
) * Crad
KX2
= 400 + COS(C
(K
).
Exit - D30
+ RotP
) * Crad
KY2
= 400 + SIN(C
(K
).
Exit - D30
+ RotP
) * Crad
'LINE (KX1, KY1)-(KX2, KY2)
IF KY1
>= Yb
AND KY2
>= Yb
THEN 'vyrez dveri je pod kulickou FOR AllXs
= Xb
- 6 TO Xb
+ 6 Kolide = IL(KX1, KY1, KX2, KY2, AllXs)
OYb = Yb
Yb = Yb + .5
IF Yb
- 400 > C
(Level
+ 1).Radius
- 16 THEN Yb
= C
(Level
+ 1).Radius
+ 400 - 16: memY
= 0: Level
= Level
+ 1: Kolide
= 0 PB Xb, Yb
PAINT (12, 12), 16 + e
, 16 + e
e = e + 1
IL = Yb
Lenx = Xb - Xe
LenY = Yb - Ye
Ratio = LenY / Lenx
IL
= INT(Yb
+ (P
- Xb
) * Ratio
)