-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
31 lines (31 loc) · 18.8 KB
/
main.blocks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</variable><variable id="l+?6E:3l!`k0I3?FX/!,">sten</variable><variable id="z3G(MuTCuKWhzUfJv)eO">sax</variable><variable id="vG+@3%^@Kl=W@))11_6F">påse</variable><variable id="`?T.XSFYK@z0CLL-orn[">skickat</variable><variable id="[email protected]">Motståndarens val</variable><variable id="|[?B])H^Vp?[~UzF!y}t">mottaget</variable></variables><block type="pxt-on-start" id="!rma+3(S$w5n/W8L.u#%" x="0" y="0"><statement name="HANDLER"><block type="radio_set_group" id="B)w6~68YQB%[email protected]"><value name="ID"><shadow type="math_number_minmax" id="K2|KzD}AZHFwgfiAsTKX"><mutation min="0" max="255" label="Id" precision="0"/><field name="SLIDER">1</field></shadow></value><next><block type="variables_set" id="={$z,?GXXSa|j)ff.F5s"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field><value name="VALUE"><shadow type="math_number" id="H/CAzz=o+Z_5?wC,{TO_"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="2`TpD^Y{d[Cf(u[QW}8p"><field name="VAR" id="[email protected]">Motståndarens val</field><value name="VALUE"><shadow type="math_number" id="Y4rlZqmN3kkeu4yxhLw^"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="L%(8871bu)_}6x)D{$nf"><field name="VAR" id="l+?6E:3l!`k0I3?FX/!,">sten</field><value name="VALUE"><shadow type="math_number" id="z#Jxu]/,jL|4:E-[Bz.e"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="Yg8]?[S_N0^H6}iIpsfX"><field name="VAR" id="z3G(MuTCuKWhzUfJv)eO">sax</field><value name="VALUE"><shadow type="math_number" id="eZ[r5J#$$N@KNs^4{yI3"><field name="NUM">2</field></shadow></value><next><block type="variables_set" id="*q{GhEm}%~Cpaeg)^Px{"><field name="VAR" id="vG+@3%^@Kl=W@))11_6F">påse</field><value name="VALUE"><shadow type="math_number" id="y51P+c/E|eZ]rYCO)~~x"><field name="NUM">3</field></shadow></value><next><block type="variables_set" id="}92|MJ@w:B[J6xN5s-NC"><field name="VAR" id="`?T.XSFYK@z0CLL-orn[">skickat</field><value name="VALUE"><shadow type="math_number" id="NOFG(Q.rH~fa$b4DT=41"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="!WBq+kib~bBPdo[YbVkB"><field name="VAR" id="|[?B])H^Vp?[~UzF!y}t">mottaget</field><value name="VALUE"><shadow type="math_number" id="QBfKU9%ZqS[V7[=au.x]"><field name="NUM">0</field></shadow></value><next><block type="device_show_leds" id="!=BU|}B=Sp2eCGQ_i[C|"><field name="LEDS">`
. . # . .
. # # # .
# # # # #
. # # # .
. . # . .
`</field></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_forever" id="+:0yJ,cV!*+:-Q{SZ53-" x="656" y="-8"><statement name="HANDLER"><block type="controls_if" id=".lzHVUry+|rkHmg%Vc7`"><value name="IF0"><shadow type="logic_boolean" id="tjHy9GffD9uTo,Wo8K!d"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="qpdx*Wryb)6yQk)tyvx="><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="Uu`k$Iak+`lEI(k8@7TO"><field name="NUM">0</field></shadow><block type="variables_get" id="*v^~zhPB_Ot4VX([}Q*f"><field name="VAR" id="`?T.XSFYK@z0CLL-orn[">skickat</field></block></value><value name="B"><shadow type="math_number" id="QACG%k%?_ritrfYVSlU:"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="v2cw(6rQ/|yzA~f@%W6e"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="k$jOsscU%DzUYg*`H4)0"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="([cOGN|O,nb!/SqpVybc"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">1</field></shadow><block type="variables_get" id="BKX-+hM1$rt]he[Ba5W0"><field name="VAR" id="l+?6E:3l!`k0I3?FX/!,">sten</field></block></value></block></value><statement name="DO0"><block type="device_show_leds" id="B)Z4fA280?F/{(;=4AEZ"><field name="LEDS">`
. . # . .
. # # # .
# # # # #
. # # # .
. . # . .
`</field></block></statement><next><block type="controls_if" id="O1nm1KeRvoha1}PzB9[m"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="_Xrc[DBLtfc}19:__x;/"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="o%dZ[Q4gz~%YeZ$2na:C"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">2</field></shadow><block type="variables_get" id="`8G_KLNVADRL,-5|}Q1h"><field name="VAR" id="z3G(MuTCuKWhzUfJv)eO">sax</field></block></value></block></value><statement name="DO0"><block type="device_show_leds" id="Fn]8X(ZwbI=xU.[Zjhzt"><field name="LEDS">`
# . . . .
. # # . .
. . . # #
. # # . .
# . . . .
`</field></block></statement><next><block type="controls_if" id="DnmL:FV;3Z9r[FzgUMf`"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="=R~^)Z^_D8R30rc2kzSU"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="EG5jQAftcme4J`9l[WI`"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">3</field></shadow><block type="variables_get" id="9*[Ho4$fV7{6LE*ZYqD{"><field name="VAR" id="vG+@3%^@Kl=W@))11_6F">påse</field></block></value></block></value><statement name="DO0"><block type="device_show_leds" id="jAC.*JG;@8,@!qKc:Q}e"><field name="LEDS">`
# . . . #
# . . . #
# . . . #
# . . . #
. # # # .
`</field></block></statement></block></next></block></next></block></statement><next><block type="device_pause" id="aC6i_aA.qnzaj*9%^hmK"><value name="pause"><shadow type="timePicker" id="-%B1$zps]W=]ZC;.b!kP"><field name="ms">1</field></shadow></value><next><block type="controls_if" id="{2QV~j+++q=i6{f~dv*;"><value name="IF0"><shadow type="logic_boolean" id="lPJV:K3:TEbixjo,d${a"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="9DfkS,iY_8%!{yiS3#Ke"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="0z72*nKEk`[2@S0tYNr%"><field name="NUM">0</field></shadow><block type="variables_get" id="$F7Z%lZ!UaH|Kxw43ISJ"><field name="VAR" id="|[?B])H^Vp?[~UzF!y}t">mottaget</field></block></value><value name="B"><shadow type="math_number" id="@6,)PM?t3J?6OHc7kTq^"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="5xIq)GahhN[W%%jUrL1:"><mutation elseif="3"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="2[hbzsOQAW^hVHM23X/x"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="*Icp[;st-b|R1UW:9}Rg"><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="QopJv:#`Jh3+pr|ke4w1"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value></block></value><statement name="DO0"><block type="device_show_leds" id="vw5SH9bpN/lt!VrO?wg#"><field name="LEDS">`
. . . . .
# # # # #
. . . . .
# # # # #
. . . . .
`</field></block></statement><value name="IF1"><block type="logic_compare" id="GEX7L]bmvIX4.=qi2ccc"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="8eTHh,w`-7?o6P(C-!/R"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">1</field></shadow><block type="variables_get" id="^G3cU:N.0=YP[JM%kaBh"><field name="VAR" id="l+?6E:3l!`k0I3?FX/!,">sten</field></block></value></block></value><statement name="DO1"><block type="controls_if" id="fukd@Y?d%p.8V*;c#iV["><mutation elseif="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="ghQ[4k67Qg#1KFlR3Y@d"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="S)Is{V4@N8S$--,j^vm#"><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">2</field></shadow><block type="variables_get" id=".DkWo]W4Rgkg#f#w~(wy"><field name="VAR" id="z3G(MuTCuKWhzUfJv)eO">sax</field></block></value></block></value><statement name="DO0"><block type="basic_show_icon" id="AoqJ{KwY=[RNFMcRIrp7"><field name="i">IconNames.Happy</field><next><block type="SoundExpression_playUntilDone" id="zGjwn{EA#KnwpkMswwc4"><field name="this">soundExpression.giggle</field></block></next></block></statement><value name="IF1"><block type="logic_compare" id="%nj)u]Smf}~BDBOWgDO."><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="jBCQB,`vmKO=JZ$/Oh$m"><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">3</field></shadow><block type="variables_get" id="yv3*Ce4}+4_6r#CAbrK^"><field name="VAR" id="vG+@3%^@Kl=W@))11_6F">påse</field></block></value></block></value><statement name="DO1"><block type="basic_show_icon" id="O9%TAP%d%_hlIVwFNmd8"><field name="i">IconNames.Sad</field><next><block type="SoundExpression_playUntilDone" id="6Dc~Z[E=InYN(/(kJ30o"><field name="this">soundExpression.sad</field></block></next></block></statement></block></statement><value name="IF2"><block type="logic_compare" id=",Hij/gN,*)SZ,46zh=ep"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id=",5U6BQnEdyVX!sk|_e,i"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">2</field></shadow><block type="variables_get" id="sHf-(/`~V81uA{1wwMuk"><field name="VAR" id="z3G(MuTCuKWhzUfJv)eO">sax</field></block></value></block></value><statement name="DO2"><block type="controls_if" id="hUAX7l@],5~YeHSKvL#+"><mutation elseif="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id=";^)D!,^peb@9^|5G(/BM"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="nETs84!0:%C)KK+U+.|R"><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number" id="-H70l4oDMCdKk7!E+_P2"><field name="NUM">3</field></shadow></value></block></value><statement name="DO0"><block type="basic_show_icon" id="QygX]GBim*m,9:a1[@kk"><field name="i">IconNames.Happy</field><next><block type="SoundExpression_playUntilDone" id="|*X9%.`H`%-)%SEa0n{N"><field name="this">soundExpression.giggle</field></block></next></block></statement><value name="IF1"><block type="logic_compare" id="`|BUpWf!35#P]ZJZGR`#"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="lFy5wiUZ:rCFUawX64K2"><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number" id="Udr18H,weU{p$Uy]l/!w"><field name="NUM">1</field></shadow></value></block></value><statement name="DO1"><block type="basic_show_icon" id="bHNUI1vxKU0f#pK?S;@e"><field name="i">IconNames.Sad</field><next><block type="SoundExpression_playUntilDone" id="Mht66CAVrgNZS*`=E:xj"><field name="this">soundExpression.sad</field></block></next></block></statement></block></statement><value name="IF3"><block type="logic_compare" id="Qrqj2A=s1c*a`hqx)fpl"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="cV|k/7w?hRg{:9=6u?Z|"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">2</field></shadow><block type="variables_get" id="F;pRJ/rHajnz2c[w~l@/"><field name="VAR" id="vG+@3%^@Kl=W@))11_6F">påse</field></block></value></block></value><statement name="DO3"><block type="controls_if" id="H~gXUl%ia|R%Q7/a4@6b"><mutation elseif="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="r@ew!$#KQ)5A2+ao7OXQ"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="ONChsLhPTn9VY^zRc|e["><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number" id="?Tu-M[TD@a,7@%*`=6]$"><field name="NUM">3</field></shadow></value></block></value><statement name="DO0"><block type="basic_show_icon" id="0[msrUHCnt-Ac4NaRlhx"><field name="i">IconNames.Happy</field><next><block type="SoundExpression_playUntilDone" id="]7wdf7jFZkm*!Rqioiu!"><field name="this">soundExpression.giggle</field></block></next></block></statement><value name="IF1"><block type="logic_compare" id="mq:gk*()E$(8I1*oSh@:"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="Lw}zE-q~P^iCm*zaC9*9"><field name="VAR" id="[email protected]">Motståndarens val</field></block></value><value name="B"><shadow type="math_number" id="Y5f!=(DLJX-nY6y,u!mZ"><field name="NUM">1</field></shadow></value></block></value><statement name="DO1"><block type="basic_show_icon" id=":Hx7E/oxkGBzC{tN:L?-"><field name="i">IconNames.Sad</field><next><block type="SoundExpression_playUntilDone" id="|4ovV/hm#DK*%E-=(^X;"><field name="this">soundExpression.sad</field></block></next></block></statement></block></statement><next><block type="variables_set" id="gS_=g#Q@Yp*kVt6^I~RH"><field name="VAR" id="|[?B])H^Vp?[~UzF!y}t">mottaget</field><value name="VALUE"><shadow type="math_number" id="u*^qT6w)kQ]:L,Yd--5N"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="^vMrV,Mh~[8|sE~w9A?T"><field name="VAR" id="`?T.XSFYK@z0CLL-orn[">skickat</field><value name="VALUE"><shadow type="math_number" id="epJT5||(qAt;U}`iwB~["><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement></block></next></block></next></block></statement></block><block type="device_button_event" id="DY:)1@C|#A?asHv`r:*9" x="-3" y="729"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="controls_if" id="cSBoJMQ8+9$]Of/k)7@4"><value name="IF0"><shadow type="logic_boolean" id="P!pqNb-;O8*.3GGGZR-_"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="00-W6_XjbHS?q$IX)#,0"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="-EK`sBJ3`jb~=42fEdfG"><field name="VAR" id="`?T.XSFYK@z0CLL-orn[">skickat</field></block></value><value name="B"><shadow type="math_number" id="NNa~c2[kr}aIWx}8~fF?"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="jGfdj[?eZUf6kbxI|e=i"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="/M]7dnx^#`_;T!u223;c"><field name="OP">ADD</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="Sj670f(:90l`[|1m!SRt"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number" id="Fpkgq0+nO@#]+Ane:R+J"><field name="NUM">1</field></shadow></value></block></value><next><block type="controls_if" id=";F.}x)[Y;4gT#eC.fSZc"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="Xy;7;~C[zu2||Q2{]}aF"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="i},9%C)q)6,Fnt~iiX3-"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><value name="B"><shadow type="math_number" id="JQ-f]jat]t5T!k_m5lbj"><field name="NUM">4</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="eY_C3,G#gk$uAKj2dfsy"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field><value name="VALUE"><shadow type="math_number" id="x[+1pYM]g[dQhz1tFJAX"><field name="NUM">1</field></shadow></value></block></statement></block></next></block></statement></block></statement></block><block type="device_button_event" id="%LsAm`J:n.g|`]8xCf{V" x="3" y="1136"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="SoundExpression_playUntilDone" id="^Dy98Wf{SNFdpS$|HQ%e"><field name="this">soundExpression.hello</field><next><block type="radio_datagram_send" id="`s4oFZ-`[5-3~@rW(tVd"><value name="value"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="@ur[eoU!Jm47^XK;(ZTp"><field name="VAR" id="TsE[A[eX#k?f@Eg}kGOh">Mitt val</field></block></value><next><block type="variables_set" id="*n_3nM.b8t7~IHI^5NHV"><field name="VAR" id="`?T.XSFYK@z0CLL-orn[">skickat</field><value name="VALUE"><shadow type="math_number" id="f:jh`JHa./rT8yz`;Zpb"><field name="NUM">1</field></shadow></value><next><block type="device_clear_display" id="/ec:4p~%C@@oe5.pAh~5"/></next></block></next></block></next></block></statement></block><block type="radio_on_number_drag" id="1_Uos_j0E`7qm`CP_@v-" x="0" y="1464"><value name="HANDLER_DRAG_PARAM_receivedNumber"><shadow type="argument_reporter_number" id="MkSL3-F%^m.=/SrVA(_7"><field name="VALUE">receivedNumber</field></shadow></value><statement name="HANDLER"><block type="variables_set" id="*1EUp%MM6S#mYI?K=(+o"><field name="VAR" id="|[?B])H^Vp?[~UzF!y}t">mottaget</field><value name="VALUE"><shadow type="math_number" id="Qq`H4Be7W8i,ZL2tOveZ"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="Tj2;5KiG_7PQ%xAJYEm8"><field name="VAR" id="[email protected]">Motståndarens val</field><value name="VALUE"><shadow type="math_number" id="L?-0L8;3n7;Fji,X7x6S"><field name="NUM">1</field></shadow><block type="argument_reporter_number" id=")W#jIf+eBf15QvTTEy#X"><field name="VALUE">receivedNumber</field></block></value></block></next></block></statement></block></xml>