Code: Select all
mas=new(1,1,INT)
mas[0,0]=1
fbox(-100,-100,200,100,RED)
spawntupe:
x1=-100
while(get_event())
{
if EVT[EVT_TUPE]==MOUSEBUTTONDOUN
{
x=EVT[EVT_X] y=EVT[EVT_Y]
s1:
if x>x1&&x<x1+100&&y>-100&&y<0
{
if mas[0,0]==1
{
fbox(x1,-100,x1+100,0,GREEN)
}
else
{
fbox(x1,-100,x1+100,0,BLUE)
}
frame()
mas[0,0]=mas[0,0]*-1
}
else
{
if x>1 {goto spawntupe}
x1=x1+100
goto s1
}
}
}
goto spawntupe