-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.blocks
1 lines (1 loc) · 8.75 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="kkOP;b~%tk.Bj@FKzG2p">Mystery</variable><variable id="b#G8l3[Gsw~){Cu/QpJV">Guess</variable><variable id="4dxvg`?N[}db$SLbp~m;">Result</variable><variable id="[7knB$Cb`YUX7AF//.5[">Step</variable></variables><comment id="GU+P,iM{,f0RzTu`RJjL" x="629" y="554" h="200" w="200">The convergence may not be optimal (try 80 for example). I worked around some issues by using a ceiling rounded div by 2.</comment><block type="pxt-on-start" id="!N~g?FJ.S^SqCLqQP62?" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="zjf)4`SXzKoj#@l2#9r#"><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field><value name="VALUE"><shadow type="math_number" id="*F3$7L{:!BfmLuAd|^[^"><field name="NUM">25</field></shadow></value><next><block type="variables_set" id="Rhi:_*VtJ6(`_]Iy|+$i"><field name="VAR" id="b#G8l3[Gsw~){Cu/QpJV">Guess</field><value name="VALUE"><shadow type="math_number" id="=5(}12G6GRZS6HoFnS.v"><field name="NUM">50</field></shadow></value><next><block type="variables_set" id=":p(Mo-7!g4Rd%%owf?*7"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field><value name="VALUE"><shadow type="math_number" id="8lzTGD6j}`C^JO6$Mg{|"><field name="NUM">0</field></shadow></value><next><block type="device_print_message" id="+3+#/j]Yjx^pNr+[;o8Z"><value name="text"><shadow type="text" id="[=t4$zR:r,O+kM-~KP9x"><field name="TEXT">Go</field></shadow></value><next><block type="device_while" id="~LJTmO[2:e)YkTHL7z_O"><value name="COND"><shadow type="logic_boolean"><field name="BOOL">FALSE</field></shadow><block type="logic_compare" id="ypeP|jO-DvA$]aB2(A:D"><field name="OP">NEQ</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="o/ZwEzrg`nP.:W9tn5z$"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field></block></value><value name="B"><shadow type="math_number" id="v7xIwf9|_xVmp@hVmpHv"><field name="NUM">3</field></shadow></value></block></value><statement name="DO"><block type="device_show_number" id="hx{|dNCjXwI;B$*V1Hqp"><value name="number"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="muh?w0z)yVOP%XEqvodD"><field name="VAR" id="b#G8l3[Gsw~){Cu/QpJV">Guess</field></block></value><next><block type="controls_if" id="F-`Kr0duD2]88:HcDucw"><mutation elseif="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="{7I5|8h1=XZdM;nYq0q-"><field name="OP">EQ</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="s_HF?h[08`i$qTNAwH1?"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field></block></value><value name="B"><shadow type="math_number" id="{6a^,zfS[Yv9J{yC*+uX"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="o%*|;D3%9/gn|^/$wOiE"><field name="VAR" id="b#G8l3[Gsw~){Cu/QpJV">Guess</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="dr(n4r^aegsVCIQNR%,q"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="4$f7/hXY1vZMVmcXbD2="><field name="VAR" id="b#G8l3[Gsw~){Cu/QpJV">Guess</field></block></value><value name="B"><shadow type="math_number" disabled="true"><field name="NUM">2</field></shadow><block type="variables_get" id="LmKU}ZZd$qF(SQ5N)VS["><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field></block></value></block></value><next><block type="variables_set" id="_{)~X95pGkH/VhN/z1Yh"><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_js_round" id="TCdNy:r=0-qW|;F+GNwY"><field name="OP">ceil</field><value name="ARG0"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="34F=$kdA]KxsxA!Bd)?c"><field name="OP">DIVIDE</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="3NJ)jkr;HQXFNVIK4e/("><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field></block></value><value name="B"><shadow type="math_number" id="^.OmH/F)8H2OK%v;d]N("><field name="NUM">2</field></shadow></value></block></value></block></value><next><block type="variables_set" id="4$Sg#ZbUMacaEvyds:bZ"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field><value name="VALUE"><shadow type="math_number" id="V1Enj#r=Bu^g$qv/^I[c"><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement><value name="IF1"><block type="logic_compare" id="U5*k_J!V4gzib{%L)x{("><field name="OP">EQ</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="4a?[+PL.;jqc[T.PzN`S"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field></block></value><value name="B"><shadow type="math_number" id="Q)u#2@|ggA|iTp9v9Q9U"><field name="NUM">2</field></shadow></value></block></value><statement name="DO1"><block type="variables_set" id="`fQfLK6p@ku8WjFjdLLW"><field name="VAR" id="b#G8l3[Gsw~){Cu/QpJV">Guess</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="~U:;|Kz@f:-ABm/^F`p."><field name="OP">ADD</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id=",Wh/[=ZprM%e6Oi+-KtQ"><field name="VAR" id="b#G8l3[Gsw~){Cu/QpJV">Guess</field></block></value><value name="B"><shadow type="math_number" disabled="true"><field name="NUM">2</field></shadow><block type="variables_get" id="oLiyMbPpn(lRLq[XeJEM"><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field></block></value></block></value><next><block type="variables_set" id="f%U[Yr#7_@nPaR=EKa61"><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_js_round" id=".*L;38n(TEdmW*R(ypfR"><field name="OP">ceil</field><value name="ARG0"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="cLe4K*?9[gLMD3iyjYHz"><field name="OP">DIVIDE</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="gAsJcz5G}dw-E+,y;7x#"><field name="VAR" id="[7knB$Cb`YUX7AF//.5[">Step</field></block></value><value name="B"><shadow type="math_number" id="F[H.lknUh3eA`38Rph9Q"><field name="NUM">2</field></shadow></value></block></value></block></value><next><block type="variables_set" id="xNJt!=[fVAS8STtjX[|;"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field><value name="VALUE"><shadow type="math_number" id="t}nC4:GN)o8.YbFtKNgd"><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement><next><block type="device_print_message" id="zMqw=LUjW4.YhJsGj+I}"><value name="text"><shadow type="text" id="YW;7#e,PU~Zuo9=4F61F"><field name="TEXT">J'ai trouvé !</field></shadow></value><next><block type="device_pause" id=".e41.aq(^EsDFjru!Rm6"><value name="pause"><shadow type="timePicker" id="KO;Y!/dp_w8~:IeJg0x9"><field name="ms">2000</field></shadow></value><next><block type="control_reset" id="KJfc?}l@Wp9`Y6%vc-(Y"></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_button_event" id=")O{yWxI[b^dmohYYTGjr" x="663" y="-5"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="variables_set" id="F7)5ULCz|pS88fAw!#1l"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field><value name="VALUE"><shadow type="math_number" id="||1+%L9*Z*oAp$V,(R9E"><field name="NUM">1</field></shadow></value></block></statement></block><block type="device_button_event" id="3CH@ikCh[G6;0pvo%-?e" x="662" y="124"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="variables_set" id="0|{s6Clxm~DL*]-qrA^Z"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field><value name="VALUE"><shadow type="math_number" id="cSA@h!XnMX6~)hz)w*9k"><field name="NUM">2</field></shadow></value></block></statement></block><block type="device_button_event" id="189|+3=-.xjA?UvDPf*!" x="660" y="257"><field name="NAME">Button.AB</field><statement name="HANDLER"><block type="variables_set" id="x[ZA20-9|*2`RNAfq7!F"><field name="VAR" id="4dxvg`?N[}db$SLbp~m;">Result</field><value name="VALUE"><shadow type="math_number" id="alt%CwrejR.}(RteQ/Ch"><field name="NUM">3</field></shadow></value></block></statement></block></xml>