EQ
AND
TRUE
10
WHILE
i
1
10
1
j
BREAK
0
ADD
1
1
ROOT
9
SIN
45
PI
EVEN
0
ROUND
3.1
SUM
64
10
50
1
100
1
100
item
abc
FIRST
text
abc
FROM_START
text
FROM_START
FROM_START
text
UPPERCASE
abc
BOTH
abc
abc
TEXT
abc
0
0
1
1
0
1
90
1
0.5
1
"Hello world"
0
0
5
FIRST
GET
FROM_START
SET
FROM_START
FROM_START
FROM_START
SPLIT
,
#Main Script
from processing import *
import random
import math
import time
### START ENGINE CODE
class Data:
url = "https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/"
#Ivo-Engine stuff
objs = []
#object are only destroyed at the end of the frame
toBeDestroyed = []
inputkeys = {} #dict
gameWidth = 800
gameHeight = 500
refWidth = 800
refHeight = 500
scaleRatio = 1
reloadEndOfFrame = False
main = None
images = {}
#Base-class of every object to enable start & update
class MonoBehaviour:
#REGION variables
x = 0
y = 0
#used for sorting
z = 0
rot = 0
#used for z-sorting internally
prevZ = -1000
#should be changed through setScale only!
scale = 1
currAnim = None
inGameScreen = True
min_x = 0
min_y = 0
max_x = 0
max_y = 0
markForUpdateSize = False
#ENDREGION
def setAnim(self, anim):
self.currAnim = anim
def setScale(self, val):
self.scale = val
#REGION Sprites
sprite = None
def set_sprite(self, url, width = None, height = None):
if (url not in Data.images):
Data.images[url] = loadImage(Data.url + url)
self.sprite = Data.images[url]
if (width != None):
self.set_width(width)
if (height != None):
self.set_height(height)
#self.updateMinMax() should be called after...
def set_width(self, width):
self.sprite.width = width
def set_height(self, height):
self.sprite.height = height
def move_forward(self, value):
self.x += math.cos(radians(self.rot-90))*value
self.y -= math.sin(radians(self.rot-90))*value
def move_right(self, value):
self.x += math.cos(radians(self.rot))*value
self.y -= math.sin(radians(self.rot))*value
#ENDREGION
#REGION Collision
def get_real_width(self):
return self.sprite.width * self.scale
def get_real_height(self):
return self.sprite.height * self.scale
def get_min_x(self):
return self.x - self.get_real_width() * 0.5
def get_max_x(self):
return self.x + self.get_real_width() * 0.5
b
def get_min_y(self):
return self.y - self.get_real_height() * 0.5
def get_max_y(self):
return self.y + self.get_real_height() * 0.5
#TODO only objects inside the gamescreen collide?
def collisionCheck(self, objType):
if (not self.inGameScreen):
return False;
for obj in Data.objs:
if (obj.inGameScreen):
if (obj is not self and type(obj).__name__ == objType):
if (self.intersects(obj)):
return obj
return False
def intersects(self, obj2):
return not (self.get_max_x() < obj2.get_min_x() or self.get_min_x() > obj2.get_max_x() or self.get_min_y() > obj2.get_max_y() or self.get_max_y() < obj2.get_min_y())
def check_in_gamescreen(self):
return not (self.get_max_x() < -Data.refWidth * 0.5 or self.get_min_x() > Data.refWidth * 0.5 or self.get_min_y() > Data.refHeight * 0.5 or self.get_max_y() < -Data.refHeight*0.5)
#ENDREGION
#REGION base functions
def start_INTERNAL(self):
#commented since empty objects can just display nothing
self.set_sprite("Empty.png")
self.start()
def update_INTERNAL(self):
self.update()
#we use translate instead of setting the objects position, to fix rotation issues
posX = (int)((self.x+Data.refWidth*0.5)*Data.scaleRatio)
posY = (int)((-self.y+Data.refHeight*0.5)*Data.scaleRatio)
translate(posX, posY)
rotate(radians(self.rot))
#if (self.currAnim != None):
# self.newSprite = self.currAnim.play()
self.inGameScreen = self.check_in_gamescreen()
if (self.inGameScreen):
image(self.sprite, 0, 0, self.get_real_width()*Data.scaleRatio, self.get_real_height()*Data.scaleRatio)
rotate(-radians(self.rot))
translate(-posX, -posY)
#Base functions to be overridden by any class inheriting from MonoBehaviour
def start(self):
pass
def update(self):
pass
def isMouseOver(self):
return (Data.mouse.x > self.get_min_x() and Data.mouse.x < self.get_max_x() and Data.mouse.y > self.get_min_y() and Data.mouse.y < self.get_max_y())
#ENDREGION
class Anim:
images = None
frames = 0
framesPerImage = 5
imageIndex = 0
timer = 0
#FRAMES OER IMAGE IS NOT THE FRAMERATE... Confusing, sorry
def __init__(self, url, frames, framesPerImage = 3):
self.images = []
self.framesPerImage = framesPerImage
self.frames = frames
for i in range(frames):
fullUrl = Data.url + url + str(i+1) + ".png"
img = requestImage(fullUrl)
self.images.append(img)
#should be called from a MonoBehaviour every frame while playing.
#looks like this: self.newSprite = currAnim.play()
def play(self):
self.timer += 1
if (self.timer >= self.framesPerImage):
self.timer = 0
self.imageIndex += 1
if (self.imageIndex >= self.frames):
self.imageIndex = 0
return self.images[self.imageIndex]
def instantiate(objtype, posX = 0, posY = 0):
n = objtype()
n.x = posX
n.y = posY
n.start_INTERNAL()
Data.objs.append(n)
return n
def destroy(obj):
#Check if objects wasn't already marked as destroyed.
if obj not in Data.toBeDestroyed:
Data.toBeDestroyed.append(obj)
def key_is_pressed(k):
if (k not in Data.inputkeys):
return False
return Data.inputkeys[k] == 1 or Data.inputkeys[k] == 2
def key_was_pressed(k):
if (k not in Data.inputkeys):
return False
return Data.inputkeys[k] == 1
def key_was_released(k):
if (k not in Data.inputkeys):
return False
return Data.inputkeys[k] == 3
def reload_game():
Data.reloadEndOfFrame = True
#SHOULD BE CALLED AT END OF DRAW
def reload_game_immediate():
Data.reloadEndOfFrame = False
Data.objs = []
Data.inputkeys = {}
Data.main = Main()
Data.main.start()
class Main(MonoBehaviour):
def start(self):
print("No Blockly Main class")
class Global:
pass
### END ENGINE CODE
################################################################
#BLOCKLY_REPLACE
################################################################
### START HELPER CODE
#z-sorting
#bubblesort with extra check for each element if it changed
def bubbleSort(alist):
pop = 0
for passnum in range(len(alist)-1,0,-1):
if (alist[passnum].z != alist[passnum].prevZ):
for i in range(passnum):
pop += 1
if alist[i].z > alist[i+1].z:
temp = alist[i]
alist[i] = alist[i+1]
alist[i+1] = temp
alist[passnum].prevZ = alist[passnum].z
#print("Sorted " + str(pop) + " elements")
### END HELPER CODE
### START PROCESSING CODE
def setup():
#SIZE_REPLACE
size(Data.gameWidth, Data.gameHeight)
Data.scaleRatio = float(Data.gameWidth) / Data.refWidth
Data.invScaleRatio = float(1)/Data.scaleRatio
imageMode(CENTER)
frameRate(30)
textSize(32*Data.scaleRatio)
reload_game_immediate()
#run first frame right away
draw()
def draw():
background(0)
Data.mouse = PVector((mouse.x* Data.invScaleRatio-Data.refWidth*0.5), -(mouse.y * Data.invScaleRatio-Data.refHeight*0.5))
#bubbleSort(Data.objs)
Data.main.update()
for obj in Data.objs:
obj.update_INTERNAL()
#printObjs()
#if was pressed, go to is pressed now
for key in Data.inputkeys:
if (Data.inputkeys[key] == 1):
Data.inputkeys[key] = 2
#if was released, go to off now
if (Data.inputkeys[key] == 3):
Data.inputkeys[key] = 0
for obj in Data.toBeDestroyed:
Data.objs.remove(obj)
Data.toBeDestroyed = []
if (Data.reloadEndOfFrame):
reload_game_immediate()
#DevTools.showFPS()
#DevTools.printObjs()
class DevTools:
lastFrame = 0
avg = 0
nFramesToUpdate = 5
nFrame = 0
def showFPS():
DevTools.nFrame += 1
if (DevTools.nFrame >= DevTools.nFramesToUpdate):
m = millis()
deltaTime = m-DevTools.lastFrame
DevTools.lastFrame = m
DevTools.nFrame = 0
DevTools.avg = DevTools.nFramesToUpdate*1000/deltaTime
ui_text("FPS: " + str(DevTools.avg), 650, 50)
def printObjs():
#objs = ""
i = 0
j = 0
for obj in Data.objs:
#objs += str(obj.z) + ", "
i+=1
if (obj.inGameScreen):
j+=1
ui_text("Objs: " + str(i) + ", in screen: " + str(j), 450, 100)
def processKeyOrMousePress(val):
if (val not in Data.inputkeys or Data.inputkeys[val] == 0):
Data.inputkeys[val] = 1
def processKeyOrMouseRelease(val):
Data.inputkeys[val] = 3
def ui_text(txt, posX, posY):
pX = (int)((posX+Data.refWidth*0.5)*Data.scaleRatio)
pY = (int)((-posY+Data.refHeight*0.5)*Data.scaleRatio)
text(txt, pX, pY )
#Processing funcs
def keyPressed():
processKeyOrMousePress(str(keyboard.key))
def keyReleased():
processKeyOrMouseRelease(str(keyboard.key))
def mousePressed():
if (mouse.button == 37):
processKeyOrMousePress("m_left")
if (mouse.button == 39):
processKeyOrMousePress("m_right")
def mouseReleased():
if (mouse.button == 37):
processKeyOrMouseRelease("m_left")
if (mouse.button == 39):
processKeyOrMouseRelease("m_right")
run()
### END PROCESSING CODE
{"main":"<xml xmlns=\"http://www.w3.org/1999/xhtml\"><variables><variable type=\"\" id=\"#)_Ic#5;onEB^2ik1.KZ\">score</variable><variable type=\"\" id=\"-fz#O{;jvYaDfcTop}i4\">start</variable></variables><block type=\"class_object\" id=\"z6g:EMun?%pLwzKc^5KQ\" x=\"-15\" y=\"-465\"><field name=\"NAME\">bird</field><statement name=\"start\"><block type=\"set_sprite\" id=\"iC`~M}w*!-(pt%!f?a|I\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"T99{UAj3UP^MdwnCOgOc\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/BirdHero.png</field></block></value></block></statement></block><block type=\"main_class_object\" id=\"t2y~K/HOpb?]^v8Sc);$\" x=\"-225\" y=\"-435\"><statement name=\"start\"><block type=\"instantiate\" id=\"rLMBi:85AZhYTz)U;{6T\"><field name=\"NAME\">robot</field></block></statement></block><block type=\"class_object\" id=\"B)?,w}.U_=,J?x4%M559\" x=\"15\" y=\"-315\"><field name=\"NAME\">robot</field><statement name=\"start\"><block type=\"set_sprite\" id=\"Kcce)sOS!9.sTyylr@uV\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"WazDZPoOZL2|e}@02gRo\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/skeleton_move.png</field></block></value></block></statement><statement name=\"update\"><block type=\"move_forward\" id=\"LF**vFBEe4p%jL|{hg_2\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"lahCleM=+9-BD1J;5]La\"><field name=\"NUM\">-10</field></shadow></value><next><block type=\"move_right\" id=\"](2L4?@J:_B[b~y}(:!c\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"MzcLh@09w3kQ`@:!xMr{\"><field name=\"NUM\">0</field></shadow></value></block></next></block></statement></block><block type=\"class_object\" id=\"T$(x1?a1r,)?8X,L}}!g\" x=\"-165\" y=\"-255\"><field name=\"NAME\">box</field><statement name=\"start\"><block type=\"set_sprite\" id=\"WD#v?LxE{JE3M?CdT2P#\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"B`@Gozt|^SHB+YDp+zgT\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/crate.png</field></block></value></block></statement></block><block type=\"class_object\" id=\"a5wP|t_HH_!T:C1BcXT#\" disabled=\"true\" x=\"375\" y=\"375\"><field name=\"NAME\">robot</field><statement name=\"start\"><block type=\"set_sprite\" id=\"4bDrcpZYgf-daMdB8ubU\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"gE.yHX6bWZC4qZJC^P7N\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/skeleton_move.png</field></block></value></block></statement><statement name=\"update\"><block type=\"move_forward\" id=\"l`Mf7yO2W%Mt2}LTxIU/\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"Ua$vjt##B]S:{/#}Y:al\"><field name=\"NUM\">1</field></shadow><block type=\"math_random_int\" id=\"Z}?SRk3[NU,ck3}I0B*$\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"?yMdBFl)`iuQYCHeR!w+\"><field name=\"NUM\">-10</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"uig0{:L2zLTsPhMrI/Ri\"><field name=\"NUM\">10</field></shadow></value></block></value><next><block type=\"move_right\" id=\"6P,k5R#IFz.uaPV:x2sC\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"~7nP+MF(np$!shsLUw-l\"><field name=\"NUM\">1</field></shadow><block type=\"math_random_int\" id=\"E*z/aM(FmDNu%sy1d]nm\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"@;d-b)^J=0M-~J2GT]RA\"><field name=\"NUM\">-10</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"UmoCWz@S0}v@_=A9!e6e\"><field name=\"NUM\">10</field></shadow></value></block></value><next><block type=\"controls_if\" id=\"=t7IJMAcye@[z:#FPIR}\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"BobDp:@|i(SV#)-K.5|m\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"get_pos\" id=\"J]E@E$SJTGUGt/9hi|hP\"><field name=\"pos\">x</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"%^+G5/UZ/xGPfX]$-y|R\"><field name=\"NUM\">330</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"@)z@s}zh:0W8jrHS5%.$\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\";U4Mhg,qB`ZIZb8dTy!f\"><field name=\"NUM\">330</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\".K?F(*!8z|ph6J~/BURI\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"md$t1WA6YjNH!5ZaHXJd\"><field name=\"OP\">LTE</field><value name=\"A\"><block type=\"get_pos\" id=\"{PD/B$F)dCT}:@52k71w\"><field name=\"pos\">x</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"*1[2Z(J--z2$G64+8[cQ\"><field name=\"NUM\">-330</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"bCyQMCDBg0y=MIn(]5Hw\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"E+^]jI/VPC$@U|hwS%kv\"><field name=\"NUM\">-330</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"h:1z#+_jkuvvzr:590x1\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"_n$E{mW:ze7c~~yCd6L$\"><field name=\"OP\">LTE</field><value name=\"A\"><block type=\"get_pos\" id=\"]|@%+0)7+f]19(QJUfs:\"><field name=\"pos\">y</field></block></value><value name=\"B\"><block type=\"math_number\" id=\".)*!`r!tA=[kZ(uFj_Yf\"><field name=\"NUM\">-200</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"5daK!G5EA5yZOG=^d8w1\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"]kBl7Yf{aQt.xra2zCj_\"><field name=\"NUM\">-200</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"brmXUjL~zHu6~x_6cdmL\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"EIu+S5,o1,1,TUW:Od%]\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"get_pos\" id=\"!kyxhLzqth|.Q7s[;!Xk\"><field name=\"pos\">y</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"Mwb9/?F.RoLfWvX7|0-]\"><field name=\"NUM\">200</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"WC`J0zsxd!Sxk-N}$q8Y\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"u0o95#0xJv+@2KU~f/Er\"><field name=\"NUM\">200</field></shadow></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type=\"class_object\" id=\"7+FCz(Zs,(Dt9~MnrC`t\" disabled=\"true\" x=\"-195\" y=\"405\"><field name=\"NAME\">box</field><statement name=\"start\"><block type=\"set_sprite\" id=\"/L.ndU7-sLBOwxY)Kyk:\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"G}c{TcBhwX30ri3o=[LE\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/crate.png</field></block></value></block></statement><statement name=\"update\"><block type=\"change_rot\" id=\"Uqv=1-=BA|84;4X^fr}M\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"$E-,T998i)0PlrgBMTGe\"><field name=\"NUM\">1</field></shadow><block type=\"math_random_int\" id=\"}kO6-#h$CgbH)-mQ2;bE\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"r$F=^6`.BFG?Rt3VCX@m\"><field name=\"NUM\">-100</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"YOy|Gh7M^xrJ(0KbB/XK\"><field name=\"NUM\">100</field></shadow></value></block></value><next><block type=\"move_forward\" id=\"RK87{;SXUQW,4p9Ad,s%\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"Ua$vjt##B]S:{/#}Y:al\"><field name=\"NUM\">1</field></shadow><block type=\"math_random_int\" id=\"=V!htdt~Z(*@w65M*p+9\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"FJc.JCUyVm^SDm@:%_%|\"><field name=\"NUM\">-10</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"OL:iO5{L:R3~=hJ0F{*)\"><field name=\"NUM\">10</field></shadow></value></block></value><next><block type=\"move_right\" id=\"IEC#gOUyM5,E16na^I6%\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"~7nP+MF(np$!shsLUw-l\"><field name=\"NUM\">1</field></shadow><block type=\"math_random_int\" id=\"{,qLh-CCBv3-BJdcY*]Z\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"*r?!;6Y}~nj#t!X*XeyE\"><field name=\"NUM\">-10</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"jm[5~=t;2,eYAjpu)B~O\"><field name=\"NUM\">10</field></shadow></value></block></value><next><block type=\"controls_if\" id=\"rI1N^d+ukF?{,6[7A)[G\"><value name=\"IF0\"><block type=\"logic_compare\" id=\";qQ4m}@bq}XJn?`51_-,\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"get_pos\" id=\"5QW|by!@0*uSm8X)CDpj\"><field name=\"pos\">x</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"kw{:j(iEf0u7%DU75bv;\"><field name=\"NUM\">330</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"=dQh_*V=#sz~fgltg$m`\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"P/QBV[E+tq~3,RS0fUeT\"><field name=\"NUM\">330</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"QDdy7l:?sBA#i7;@WeA6\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"/S)JL^xfU?k!df/MIb7k\"><field name=\"OP\">LTE</field><value name=\"A\"><block type=\"get_pos\" id=\"9Lu;IV;50+vxLN$zKDk[\"><field name=\"pos\">x</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"$,c=XkhCt/Ut0@!yL#e*\"><field name=\"NUM\">-330</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"P(bCsMWz.Sb@/r5z{zk$\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"L6Dur~k]Uz}H;TQ^Q9{:\"><field name=\"NUM\">-330</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"E%Y+on()!Q7T2yc5`z:S\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"G0QU!`_15Ga`TEs~XWOM\"><field name=\"OP\">LTE</field><value name=\"A\"><block type=\"get_pos\" id=\"y~J~)TNufw]Cyz.v*{$0\"><field name=\"pos\">y</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"3s?}4dFs^A3$!,PPvwsN\"><field name=\"NUM\">-200</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"T.r*]ZQMe*FMyk/pz9y9\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"9h5MSkPC*1jiI5e!N,!$\"><field name=\"NUM\">-200</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"#RUWh=I)RKKAz~M?Own@\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"Qb9K0D2_+Q)R/.^Q;b38\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"get_pos\" id=\"Fnqq}+WoJP@M/|3D3(M*\"><field name=\"pos\">y</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"+XZefqRkO6BVl2Z;N4mO\"><field name=\"NUM\">200</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_pos\" id=\"44_1;EmxlsrVK#!QFGYR\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"J@9l)7}}Sb4x$Sy#]e0{\"><field name=\"NUM\">200</field></shadow></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type=\"main_class_object\" id=\";d!W4u;rSV_[%vG80|L+\" disabled=\"true\" x=\"105\" y=\"765\"><statement name=\"start\"><block type=\"variables_set_custom\" id=\"1v*Mwf$,zLebLEo4,p!T\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"#)_Ic#5;onEB^2ik1.KZ\" variabletype=\"\">score</field><value name=\"VALUE\"><block type=\"math_number\" id=\"7b[i7=(`mqG]I-Q-Xlk7\"><field name=\"NUM\">0</field></block></value><next><block type=\"variables_set_custom\" id=\"{8;:yj?#ZlS#+2wvqJzW\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"-fz#O{;jvYaDfcTop}i4\" variabletype=\"\">start</field><value name=\"VALUE\"><block type=\"math_number\" id=\"|b@39zwYa5%UD=G@yT!/\"><field name=\"NUM\">0</field></block></value></block></next></block></statement><statement name=\"update\"><block type=\"variables_change_custom\" id=\"S0vS=NuBkvM^cst`zg]H\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"#)_Ic#5;onEB^2ik1.KZ\" variabletype=\"\">score</field><value name=\"VALUE\"><block type=\"math_number\" id=\"~,MH5~jnv^5{z,Kw*K#.\"><field name=\"NUM\">1</field></block></value><next><block type=\"variables_change_custom\" id=\"Rm,0{%g!}]a:2A5GqCG?\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"-fz#O{;jvYaDfcTop}i4\" variabletype=\"\">start</field><value name=\"VALUE\"><block type=\"math_number\" id=\"4txUeEi@6]6(7[qf.Htb\"><field name=\"NUM\">1</field></block></value><next><block type=\"controls_if\" id=\"cy{izkI;4~trlp44:aC2\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"gG#qhl|s:qKc[-iT_]Zp\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"variables_get_custom\" id=\"j?o53#ChJSz[-+_B*=v0\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"#)_Ic#5;onEB^2ik1.KZ\" variabletype=\"\">score</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"l/lk`J[whE9c@XOKHO%h\"><field name=\"NUM\">120</field></block></value></block></value><statement name=\"DO0\"><block type=\"instantiate_at_pos\" id=\"|9zGKBVV0r2I3PeQ(2YJ\"><field name=\"type\">robot</field><value name=\"x\"><shadow type=\"math_number\" id=\"d0O$F1mMb}p;0cxQUxLM\"><field name=\"NUM\">0</field></shadow><block type=\"math_random_int\" id=\"=I^*Z69B]Ky*$2Qi!K3(\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"mIZ5u6P|[bbM@9ktmaj?\"><field name=\"NUM\">-100</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"yvH*gF%!QBgRbMxq:8OG\"><field name=\"NUM\">100</field></shadow></value></block></value><value name=\"y\"><shadow type=\"math_number\" id=\"m]LFHQA5/j@)(TDx(`T@\"><field name=\"NUM\">0</field></shadow><block type=\"math_random_int\" id=\"2SWU(@RAeuybEu%n7qEt\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"[POAOpP9|w+Qz^^5oap-\"><field name=\"NUM\">-100</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"E8k8:tEi?Dl7(@l|8pcF\"><field name=\"NUM\">100</field></shadow></value></block></value><next><block type=\"variables_set_custom\" id=\"+=+{~{l?WE/.hMSEDD7C\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"#)_Ic#5;onEB^2ik1.KZ\" variabletype=\"\">score</field><value name=\"VALUE\"><block type=\"math_number\" id=\"j65=r|_x{e;BFP?E|#2z\"><field name=\"NUM\">0</field></block></value></block></next></block></statement><next><block type=\"controls_if\" id=\"~Ni5ga_O53/}.A~;[|rU\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"{T`e,jy;|0Av=E^`e?wd\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"variables_get_custom\" id=\"3w0zoBvQDU#9=GGkc!A+\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"-fz#O{;jvYaDfcTop}i4\" variabletype=\"\">start</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"`Ivc8Ii,2IE62p4mjpYE\"><field name=\"NUM\">240</field></block></value></block></value><statement name=\"DO0\"><block type=\"instantiate_at_pos\" id=\"!/oH*q*f]3*+h)$J.2Z4\"><field name=\"type\">box</field><value name=\"x\"><shadow type=\"math_number\" id=\"d0O$F1mMb}p;0cxQUxLM\"><field name=\"NUM\">0</field></shadow><block type=\"math_random_int\" id=\"X:Yit),S0%)+4WV=QBZ*\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"w4PO]OVVccV2]fJicyRu\"><field name=\"NUM\">-100</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"`9?jz.A@DF{l25~o|M8B\"><field name=\"NUM\">100</field></shadow></value></block></value><value name=\"y\"><shadow type=\"math_number\" id=\"m]LFHQA5/j@)(TDx(`T@\"><field name=\"NUM\">0</field></shadow><block type=\"math_random_int\" id=\"eYjUATvZ@HN%K)6]v#;F\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"[%M[Uv~?j#-cItHcM6?/\"><field name=\"NUM\">-100</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"d0,6cnw*[vsVN7,:C;=v\"><field name=\"NUM\">100</field></shadow></value></block></value><next><block type=\"variables_set_custom\" id=\"{ja{E4D}vL5=A+sr46N5\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"-fz#O{;jvYaDfcTop}i4\" variabletype=\"\">start</field><value name=\"VALUE\"><block type=\"math_number\" id=\"n}3sS.rk%t]n|q8`n+0z\"><field name=\"NUM\">0</field></block></value></block></next></block></statement></block></next></block></next></block></next></block></statement></block></xml>"}