Klotski Puzzle Game (3-Horizontal 2-Vertical Student Edition)
2020-11-22 12:24
This GeoGebra applet demonstrates the classic Klotski sliding block puzzle. Using polygons and points, it constructs the game board, various sized blocks, and boundary walls. Users can drag the blocks to find the optimal solution while the system tracks the number of moves. This example showcases how to use GeoGebra's interactive features, conditional visibility, and scripting to implement complex
In collections
Math Games with GeoGebra
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.616.0" app="classic" platform="w" id="c790fac0-3532-46a1-9766-74418627402b" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/apps/xsd/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="506" height="758" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.1976284584980237" orientation="1" />
</panes>
<views>
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 51 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="false" inframe="false" stylebar="false" location="1,1,1" size="500" window="100,100,600,400" />
<view id="4" toolbar="0 || 2020 , 2021 , 2022 , 66 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="false" location="1,1" size="300" window="100,100,600,400" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 1009 || 66 68 || 6" visible="false" inframe="false" stylebar="false" location="1,3" size="300" window="100,100,600,400" />
<view id="4097" visible="false" inframe="false" stylebar="true" location="1,1" size="380" window="-44,166,1874,1013" />
<view id="1" visible="true" inframe="false" stylebar="true" location="1" size="504" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="true" location="3" size="300" tab="ALGEBRA" window="775,41,370,998" />
<view id="16" visible="false" inframe="false" stylebar="true" location="1" size="145" window="549,451,500,176" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="64" toolbar="0" visible="false" inframe="false" stylebar="false" location="1" size="150" window="50,50,500,500" />
<view id="128" visible="false" inframe="false" stylebar="false" location="1" size="480" window="50,50,500,500" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
</views>
<toolbar show="false" items="0 39 73 62 | 1 501 67 , 5 19 , 72 75 76 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 14 68 | 30 29 54 32 31 33 | 25 17 26 60 52 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" />
<input show="false" cmd="true" top="algebra" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="3"/>
<font size="24"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="504" height="756"/>
<coordSystem xZero="60.28951057222472" yZero="537.2828670708316" scale="95.85524471388767" yscale="95.85524471388767"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="2" rightAngleStyle="1" checkboxSize="26" gridType="3" lockedAxesRatio="1"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="0" spreadsheet="0"/>
<coordStyle val="0"/>
</kernel>
<tableview min="-2" max="2" step="1"/>
<scripting blocked="false" disabled="false"/>
<construction title="" author="" date="">
<expression label="PA" exp="(1, 2)" type="point"/>
<element type="point" label="PA">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelOffset x="-42" y="34"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="1" y="2" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P1" exp="(0, 2)" type="point"/>
<element type="point" label="P1">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelOffset x="0" y="-6"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0" y="2" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P2" exp="(3, 2)" type="point"/>
<element type="point" label="P2">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="3" y="2" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P3" exp="(1, 4)" type="point"/>
<element type="point" label="P3">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="1" y="4" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P4" exp="(0, 0)" type="point"/>
<element type="point" label="P4">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0" y="0" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P5" exp="(2, 0)" type="point"/>
<element type="point" label="P5">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelOffset x="10" y="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="2" y="0" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P6" exp="(0, 4)" type="point"/>
<element type="point" label="P6">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0" y="4" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P7" exp="(3, 4)" type="point"/>
<element type="point" label="P7">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="3" y="4" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P8" exp="(0, 1)" type="point"/>
<element type="point" label="P8">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelOffset x="2" y="6"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="P9" exp="(3, 1)" type="point"/>
<element type="point" label="P9">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="9"/>
<labelOffset x="6" y="1"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="3" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="{PA, PA + (2, 0), PA + (2, 2), PA + (0, 2)}"/>
<output a0="blockA"/>
</command>
<element type="polygon" label="blockA">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0.75"/>
<layer val="1"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,PA]
SetValue[S2,PA]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
#空格在上時
If[(T2-T1==(1,0)||S2==S1+(1,0))&&(T1-S1==(0,2)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(0,1)]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-T2==(1,0)||S1==S2+(1,0))&&(T2-S2==(0,2)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(0,1)]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
#空格在下時
If[(T2-T1==(1,0)||S2==S1+(1,1))&&(T1-S1==(0,-1)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(0,-1)]","SetValue[S2,S1+(1,1)]","SetValue[T2,S2]","SetValue[T1,S1+(0,1)]"}]]
If[(T1-T2==(1,0)||S1==S2+(1,1))&&(T2-S2==(0,-1)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(0,-1)]","SetValue[S1,S2+(1,1)]","SetValue[T1,S1]","SetValue[T2,S2+(0,1)]"}]]
#空格在左時
If[(T2-T1==(0,1)||S2==S1+(1,1))&&(T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(-1,0)]","SetValue[S2,S1+(1,1)]","SetValue[T2,S2]","SetValue[T1,S1+(1,0)]"}]]
If[(T1-T2==(0,1)||S1==S2+(1,1))&&(T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(-1,0)]","SetValue[S1,S2+(1,1)]","SetValue[T1,S1]","SetValue[T2,S2+(1,0)]"}]]
#空格在右時
If[(T2-T1==(0,1)||S2==S1+(0,1))&&(T1-S1==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(1,0)]","SetValue[S2,S1+(0,1)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-T2==(0,1)||S1==S2+(0,1))&&(T2-S2==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[PA,PA+(1,0)]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]"/>
<ggbscript onUpdate="If[PA==(1,0),Execute[{"SetValue[PA,(1,-1)]","StartAnimation(B)"}]]
"/>
</element>
<command name="Polygon">
<input a0="{P1, P1 + (1, 0), P1 + (1, 2), P1 + (0, 2)}"/>
<output a0="block1"/>
</command>
<element type="polygon" label="block1">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P1]
SetValue[S2,P1]

SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]

#空格相連在上或下時
If[(T2-S2==(0,3)&&T1-S1==(0,2)),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1]","SetValue[S2,S1+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T1-S1==(0,3)&&T2-S2==(0,2)),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T2-S2==(0,-2)&&T1-S1==(0,-1)),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T1-S1==(0,-2)&&T2-S2==(0,-1)),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1]","SetValue[S2,S1+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格在左或右時
If[T2-T1==(0,1)&&(T1-S1==(1,0)||T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1]","SetValue[S2,S1+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[T1-T2==(0,1)&&(T2-S2==(1,0)||T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格僅一格在上或下時
If[T1-S1==(0,2)&&T2-S2<>(0,-1)&&T2-S2<>(0,3),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1-(0,1)]","SetValue[T1,S1]"}]]
If[T2-S2==(0,2)&&T1-S1<>(0,-1)&&T1-S1<>(0,3),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2-(0,1)]","SetValue[T2,S2]"}]]
If[T1-S1==(0,-1)&&T2-S2<>(0,-2)&&T2-S2<>(0,2),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1]","SetValue[T1,S1+(0,1)]"}]]
If[T2-S2==(0,-1)&&T1-S1<>(0,-2)&&T1-S1<>(0,2),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2]","SetValue[T2,S2+(0,1)]"}]]

#空格一上一下時
If[(T1-S1==(0,2)&&T2-S2==(0,-1))||(T2-S2==(0,2)&&T1-S1==(0,-1))&&whereto1==false,Execute[{"SetValue[showblank,true]","SetValue[whereto1,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto1,false]"}]]

"/>
</element>
<command name="Polygon">
<input a0="{P2, P2 + (1, 0), P2 + (1, 2), P2 + (0, 2)}"/>
<output a0="block2"/>
</command>
<element type="polygon" label="block2">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P2]
SetValue[S2,P2]
SetValue[whereto1,false]

SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]

#空格相連在上或下時
If[(T2-S2==(0,3)&&T1-S1==(0,2)),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1]","SetValue[S2,S1+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T1-S1==(0,3)&&T2-S2==(0,2)),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T2-S2==(0,-2)&&T1-S1==(0,-1)),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T1-S1==(0,-2)&&T2-S2==(0,-1)),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1]","SetValue[S2,S1+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格在左或右時
If[T2-T1==(0,1)&&(T1-S1==(1,0)||T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1]","SetValue[S2,S1+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[T1-T2==(0,1)&&(T2-S2==(1,0)||T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2]","SetValue[S1,S2+(0,1)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格僅一格在上或下時
If[T1-S1==(0,2)&&T2-S2<>(0,-1)&&T2-S2<>(0,3),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1-(0,1)]","SetValue[T1,S1]"}]]
If[T2-S2==(0,2)&&T1-S1<>(0,-1)&&T1-S1<>(0,3),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2-(0,1)]","SetValue[T2,S2]"}]]
If[T1-S1==(0,-1)&&T2-S2<>(0,-2)&&T2-S2<>(0,2),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1]","SetValue[T1,S1+(0,1)]"}]]
If[T2-S2==(0,-1)&&T1-S1<>(0,-2)&&T1-S1<>(0,2),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2]","SetValue[T2,S2+(0,1)]"}]]

#空格一上一下時
If[(T1-S1==(0,2)&&T2-S2==(0,-1))||(T2-S2==(0,2)&&T1-S1==(0,-1))&&whereto2==false,Execute[{"SetValue[showblank,true]","SetValue[whereto2,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto2,false]"}]]
"/>
</element>
<command name="Polygon">
<input a0="{P3, P3 + (2, 0), P3 + (2, 1), P3 + (0, 1)}"/>
<output a0="block3"/>
</command>
<element type="polygon" label="block3">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="255" g="215" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P3]
SetValue[S2,P3]
SetValue[whereto1,false]
SetValue[whereto2,false]

SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]

#空格在上或下時
If[(T2-T1==(1,0))&&(S1-T1==(0,1)||T1-S1==(0,1)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T1]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-T2==(1,0))&&(S2-T2==(0,1)||T2-S2==(0,1)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格僅一格在左或右時
If[T1-S1==(2,0)&&S2-T2<>(1,0)&&T2-S2<>(3,0),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T1-(1,0)]","SetValue[T1,S1]"}]]
If[T2-S2==(2,0)&&S1-T1<>(1,0)&&T1-S1<>(3,0),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2-(1,0)]","SetValue[T2,S2]"}]]
If[S1-T1==(1,0)&&S2-T2<>(2,0)&&T2-S2<>(2,0),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T1]","SetValue[T1,S1+(1,0)]"}]]
If[S2-T2==(1,0)&&S1-T1<>(2,0)&&T1-S1<>(2,0),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2]","SetValue[T2,S2+(1,0)]"}]]
#兩空格相連在左或右時
If[(T2-S2==(3,0)&&T1-S1==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T1]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-S1==(3,0)&&T2-S2==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T2-S2==(-2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2]","SetValue[S1,S2+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-S1==(-2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T1]","SetValue[S2,S1+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格在左或右或一左一右時
If[((T2-S2==(3,0)&&T1-S1==(2,0))||(T2-S2==(-2,0)&&T1-S1==(-1,0))||(T1-S1==(3,0)&&T2-S2==(2,0))||(T1-S1==(-2,0)&&T2-S2==(-1,0))||(T1-S1==(2,0)&&T2-S2==(-1,0))||(T2-S2==(2,0)&&T1-S1==(-1,0)))&&whereto3==false,Execute[{"SetValue[showblank,true]","SetValue[whereto3,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto3,false]"}]]"/>
</element>
<command name="Polygon">
<input a0="{P4, P4 + (2, 0), P4 + (2, 1), P4 + (0, 1)}"/>
<output a0="block4"/>
</command>
<element type="polygon" label="block4">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="255" g="215" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P4]
SetValue[S2,P4]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]

SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]

#空格在上或下時
If[(T2-T1==(1,0))&&(S1-T1==(0,1)||T1-S1==(0,1)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T1]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-T2==(1,0))&&(S2-T2==(0,1)||T2-S2==(0,1)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格僅一格在左或右時
If[T1-S1==(2,0)&&S2-T2<>(1,0)&&T2-S2<>(3,0),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T1-(1,0)]","SetValue[T1,S1]"}]]
If[T2-S2==(2,0)&&S1-T1<>(1,0)&&T1-S1<>(3,0),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2-(1,0)]","SetValue[T2,S2]"}]]
If[S1-T1==(1,0)&&S2-T2<>(2,0)&&T2-S2<>(2,0),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T1]","SetValue[T1,S1+(1,0)]"}]]
If[S2-T2==(1,0)&&S1-T1<>(2,0)&&T1-S1<>(2,0),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2]","SetValue[T2,S2+(1,0)]"}]]
#兩空格相連在左或右時
If[(T2-S2==(3,0)&&T1-S1==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T1]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-S1==(3,0)&&T2-S2==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T2-S2==(-2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2]","SetValue[S1,S2+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-S1==(-2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T1]","SetValue[S2,S1+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格在左或右或一左一右時
If[((T2-S2==(3,0)&&T1-S1==(2,0))||(T2-S2==(-2,0)&&T1-S1==(-1,0))||(T1-S1==(3,0)&&T2-S2==(2,0))||(T1-S1==(-2,0)&&T2-S2==(-1,0))||(T1-S1==(2,0)&&T2-S2==(-1,0))||(T2-S2==(2,0)&&T1-S1==(-1,0)))&&whereto4==false,Execute[{"SetValue[showblank,true]","SetValue[whereto4,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto4,false]"}]]"/>
</element>
<command name="Polygon">
<input a0="{P5, P5 + (2, 0), P5 + (2, 1), P5 + (0, 1)}"/>
<output a0="block5"/>
</command>
<element type="polygon" label="block5">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="255" g="215" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P5]
SetValue[S2,P5]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]

SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
#空格在上或下時
If[(T2-T1==(1,0))&&(S1-T1==(0,1)||T1-S1==(0,1)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T1]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-T2==(1,0))&&(S2-T2==(0,1)||T2-S2==(0,1)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T2]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格僅一格在左或右時
If[T1-S1==(2,0)&&S2-T2<>(1,0)&&T2-S2<>(3,0),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T1-(1,0)]","SetValue[T1,S1]"}]]
If[T2-S2==(2,0)&&S1-T1<>(1,0)&&T1-S1<>(3,0),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T2-(1,0)]","SetValue[T2,S2]"}]]
If[S1-T1==(1,0)&&S2-T2<>(2,0)&&T2-S2<>(2,0),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T1]","SetValue[T1,S1+(1,0)]"}]]
If[S2-T2==(1,0)&&S1-T1<>(2,0)&&T1-S1<>(2,0),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T2]","SetValue[T2,S2+(1,0)]"}]]
#兩空格相連在左或右時
If[(T2-S2==(3,0)&&T1-S1==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T1]","SetValue[S2,S1+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-S1==(3,0)&&T2-S2==(2,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T2]","SetValue[S1,S2+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]
If[(T2-S2==(-2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T2]","SetValue[S1,S2+(1,0)]","SetValue[T2,S2]","SetValue[T1,S1]"}]]
If[(T1-S1==(-2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T1]","SetValue[S2,S1+(1,0)]","SetValue[T1,S1]","SetValue[T2,S2]"}]]

#空格在左或右或一左一右時
If[((T2-S2==(3,0)&&T1-S1==(2,0))||(T2-S2==(-2,0)&&T1-S1==(-1,0))||(T1-S1==(3,0)&&T2-S2==(2,0))||(T1-S1==(-2,0)&&T2-S2==(-1,0))||(T1-S1==(2,0)&&T2-S2==(-1,0))||(T2-S2==(2,0)&&T1-S1==(-1,0)))&&whereto5==false,Execute[{"SetValue[showblank,true]","SetValue[whereto5,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto5,false]"}]]"/>
</element>
<command name="Polygon">
<input a0="{P6, P6 + (1, 0), P6 + (1, 1), P6 + (0, 1)}"/>
<output a0="block6"/>
</command>
<element type="polygon" label="block6">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P6]
SetValue[S2,P6]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]

SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
#僅有一空格距離1時
If[Distance[T1,S1]==1&&Distance[T1,T2]<>1&&Distance[T2,S2]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T2,S2]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P6,T1]","SetValue[T1,S1]"}]]
If[Distance[T2,S2]==1&&Distance[T1,T2]<>1&&Distance[T1,S1]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T1,S1]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P6,T2]","SetValue[T2,S2]"}]]
#兩空格相連於同側時
If[(T1-S1==(1,0)&&T2-S2==(2,0))||(T1-S1==(-1,0)&&T2-S2==(-2,0))||(T1-S1==(0,1)&&T2-S2==(0,2))||(T1-S1==(0,-1)&&T2-S2==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P6,T2]","SetValue[S1,T1]","SetValue[T2,S2]"}]]
If[(T2-S2==(1,0)&&T1-S1==(2,0))||(T2-S2==(-1,0)&&T1-S1==(-2,0))||(T2-S2==(0,1)&&T1-S1==(0,2))||(T2-S2==(0,-1)&&T1-S1==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P6,T1]","SetValue[S2,T2]","SetValue[T1,S1]"}]]

#兩空格距離皆1時
If[((Distance[T1,S1]==1&&Distance[T2,S2]==1)||(Distance[T1,S1]==1&&Distance[T1,T2]==1&&Distance[T2,S2]<>1)||(Distance[T2,S2]==1&&Distance[T1,T2]==1&&Distance[T1,S1]<>1))&&whereto6==false,Execute[{"SetValue[showblank,true]","SetValue[whereto6,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto6,false]"}]]"/>
</element>
<command name="Polygon">
<input a0="{(0, 0), (0, 5), (4, 5), (4, 0), (3, 0), (3, -0.5), (4.5, -0.5), (4.5, 5.5), (-0.5, 5.5), (-0.5, -0.5), (1, -0.5), (1, 0)}"/>
<output a0="wall"/>
</command>
<element type="polygon" label="wall">
<lineStyle thickness="0" type="0" typeHidden="1" opacity="191"/>
<show object="true" label="false" ev="4"/>
<objColor r="32" g="32" b="32" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<command name="Polygon">
<input a0="{P7, P7 + (1, 0), P7 + (1, 1), P7 + (0, 1)}"/>
<output a0="block7"/>
</command>
<element type="polygon" label="block7">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P7]
SetValue[S2,P7]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]

SetValue[whereto8,false]
SetValue[whereto9,false]
#僅有一空格距離1時
If[Distance[T1,S1]==1&&Distance[T1,T2]<>1&&Distance[T2,S2]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T2,S2]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P7,T1]","SetValue[T1,S1]"}]]
If[Distance[T2,S2]==1&&Distance[T1,T2]<>1&&Distance[T1,S1]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T1,S1]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P7,T2]","SetValue[T2,S2]"}]]
#兩空格相連於同側時
If[(T1-S1==(1,0)&&T2-S2==(2,0))||(T1-S1==(-1,0)&&T2-S2==(-2,0))||(T1-S1==(0,1)&&T2-S2==(0,2))||(T1-S1==(0,-1)&&T2-S2==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P7,T2]","SetValue[S1,T1]","SetValue[T2,S2]"}]]
If[(T2-S2==(1,0)&&T1-S1==(2,0))||(T2-S2==(-1,0)&&T1-S1==(-2,0))||(T2-S2==(0,1)&&T1-S1==(0,2))||(T2-S2==(0,-1)&&T1-S1==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P7,T1]","SetValue[S2,T2]","SetValue[T1,S1]"}]]

#兩空格距離皆1時
If[((Distance[T1,S1]==1&&Distance[T2,S2]==1)||(Distance[T1,S1]==1&&Distance[T1,T2]==1&&Distance[T2,S2]<>1)||(Distance[T2,S2]==1&&Distance[T1,T2]==1&&Distance[T1,S1]<>1))&&whereto7==false,Execute[{"SetValue[showblank,true]","SetValue[whereto7,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto7,false]"}]]"/>
</element>
<command name="Polygon">
<input a0="{P8, P8 + (1, 0), P8 + (1, 1), P8 + (0, 1)}"/>
<output a0="block8"/>
</command>
<element type="polygon" label="block8">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P8]
SetValue[S2,P8]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]

SetValue[whereto9,false]
#僅有一空格距離1時
If[Distance[T1,S1]==1&&Distance[T1,T2]<>1&&Distance[T2,S2]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T2,S2]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P8,T1]","SetValue[T1,S1]"}]]
If[Distance[T2,S2]==1&&Distance[T1,T2]<>1&&Distance[T1,S1]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T1,S1]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P8,T2]","SetValue[T2,S2]"}]]
#兩空格相連於同側時
If[(T1-S1==(1,0)&&T2-S2==(2,0))||(T1-S1==(-1,0)&&T2-S2==(-2,0))||(T1-S1==(0,1)&&T2-S2==(0,2))||(T1-S1==(0,-1)&&T2-S2==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P8,T2]","SetValue[S1,T1]","SetValue[T2,S2]"}]]
If[(T2-S2==(1,0)&&T1-S1==(2,0))||(T2-S2==(-1,0)&&T1-S1==(-2,0))||(T2-S2==(0,1)&&T1-S1==(0,2))||(T2-S2==(0,-1)&&T1-S1==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P8,T1]","SetValue[S2,T2]","SetValue[T1,S1]"}]]

#兩空格距離皆1時
If[((Distance[T1,S1]==1&&Distance[T2,S2]==1)||(Distance[T1,S1]==1&&Distance[T1,T2]==1&&Distance[T2,S2]<>1)||(Distance[T2,S2]==1&&Distance[T1,T2]==1&&Distance[T1,S1]<>1))&&whereto8==false,Execute[{"SetValue[showblank,true]","SetValue[whereto8,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto8,false]"}]]"/>
</element>
<command name="Polygon">
<input a0="{P9, P9 + (1, 0), P9 + (1, 1), P9 + (0, 1)}"/>
<output a0="block9"/>
</command>
<element type="polygon" label="block9">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="SetValue[S1,P9]
SetValue[S2,P9]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]

#僅有一空格距離1時
If[Distance[T1,S1]==1&&Distance[T1,T2]<>1&&Distance[T2,S2]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T2,S2]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P9,T1]","SetValue[T1,S1]"}]]
If[Distance[T2,S2]==1&&Distance[T1,T2]<>1&&Distance[T1,S1]<>1&&(Distance[T1,T2]<>sqrt(2)||Distance[T1,T2]==sqrt(2)&&Distance[T1,S1]==sqrt(5)),Execute[{"SetValue[counts,counts+1]","SetValue[P9,T2]","SetValue[T2,S2]"}]]
#兩空格相連於同側時
If[(T1-S1==(1,0)&&T2-S2==(2,0))||(T1-S1==(-1,0)&&T2-S2==(-2,0))||(T1-S1==(0,1)&&T2-S2==(0,2))||(T1-S1==(0,-1)&&T2-S2==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P9,T2]","SetValue[S1,T1]","SetValue[T2,S2]"}]]
If[(T2-S2==(1,0)&&T1-S1==(2,0))||(T2-S2==(-1,0)&&T1-S1==(-2,0))||(T2-S2==(0,1)&&T1-S1==(0,2))||(T2-S2==(0,-1)&&T1-S1==(0,-2)),Execute[{"SetValue[counts,counts+1]","SetValue[P9,T1]","SetValue[S2,T2]","SetValue[T1,S1]"}]]

#兩空格距離皆1時
If[((Distance[T1,S1]==1&&Distance[T2,S2]==1)||(Distance[T1,S1]==1&&Distance[T1,T2]==1&&Distance[T2,S2]<>1)||(Distance[T2,S2]==1&&Distance[T1,T2]==1&&Distance[T1,S1]<>1))&&whereto9==false,Execute[{"SetValue[showblank,true]","SetValue[whereto9,true]"}],Execute[{"SetValue[showblank,false]","SetValue[whereto9,false]"}]]"/>
</element>
<expression label="T1" exp="(1, 1)" type="point"/>
<element type="point" label="T1">
<show object="false" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-39" y="36"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="1" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="T2" exp="(2, 1)" type="point"/>
<element type="point" label="T2">
<show object="true" label="true" ev="4"/>
<condition showObject="wheretopt"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-37" y="37"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="2" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="S2" exp="(3, 4)" type="point"/>
<element type="point" label="S2">
<show object="false" label="true" ev="4"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="12" y="28"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="3" y="4" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="S1" exp="(3, 4)" type="point"/>
<element type="point" label="S1">
<show object="false" label="true" ev="4"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-2" y="36"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="3" y="4" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="{T1, T1 + (1, 0), T1 + (1, 1), T1 + (0, 1)}"/>
<output a0="blank1"/>
</command>
<element type="polygon" label="blank1">
<lineStyle thickness="2" type="0" typeHidden="1" opacity="178"/>
<show object="false" label="false" ev="4"/>
<condition showObject="showblank"/>
<objColor r="128" g="128" b="128" alpha="1" fillType="1" hatchAngle="135" hatchDistance="5"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<ggbscript val="#方塊1
If[showblank==true&&whereto1==true&&((T1-S1==(0,2)&&T2-S2==(0,-1))),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1-(0,1)]","SetValue[T1,S1]"}]]
If[showblank==true&&whereto1==true&&((T2-S2==(0,2)&&T1-S1==(0,-1))),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T1]","SetValue[T1,S1+(0,1)]"}]]
#方塊2
If[showblank==true&&whereto2==true&&((T1-S1==(0,2)&&T2-S2==(0,-1))),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1-(0,1)]","SetValue[T1,S1]"}]]
If[showblank==true&&whereto2==true&&((T2-S2==(0,2)&&T1-S1==(0,-1))),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T1]","SetValue[T1,S1+(0,1)]"}]]
#方塊3
If[showblank==true&&whereto3==true&&(T1-S1==(2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,S1+(1,0)]","SetValue[T1,S1]"}]]
If[showblank==true&&whereto3==true&&(T2-S2==(2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T1]","SetValue[T1,S1+(1,0)]"}]]
#方塊4
If[showblank==true&&whereto4==true&&(T1-S1==(2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,S1+(1,0)]","SetValue[T1,S1]"}]]
If[showblank==true&&whereto4==true&&(T2-S2==(2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T1]","SetValue[T1,S1+(1,0)]"}]]
#方塊5
If[showblank==true&&whereto5==true&&(T1-S1==(2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,S1+(1,0)]","SetValue[T1,S1]"}]]
If[showblank==true&&whereto5==true&&(T2-S2==(2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T1]","SetValue[T1,S1+(1,0)]"}]]
#方塊6
If[showblank==true&&whereto6==true,Execute[{"SetValue[counts,counts+1]","SetValue[P6,T1]","SetValue[T1,S1]"}]]
#方塊7
If[showblank==true&&whereto7==true,Execute[{"SetValue[counts,counts+1]","SetValue[P7,T1]","SetValue[T1,S1]"}]]
#方塊8
If[showblank==true&&whereto8==true,Execute[{"SetValue[counts,counts+1]","SetValue[P8,T1]","SetValue[T1,S1]"}]]
#方塊9
If[showblank==true&&whereto9==true,Execute[{"SetValue[counts,counts+1]","SetValue[P9,T1]","SetValue[T1,S1]"}]]

SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
"/>
</element>
<command name="Polygon">
<input a0="{T2, T2 + (1, 0), T2 + (1, 1), T2 + (0, 1)}"/>
<output a0="blank2"/>
</command>
<element type="polygon" label="blank2">
<lineStyle thickness="2" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false" ev="4"/>
<condition showObject="showblank"/>
<objColor r="128" g="128" b="128" alpha="1" fillType="1" hatchAngle="45" hatchDistance="5"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<ggbscript val="#方塊1
If[showblank==true&&whereto1==true&&((T2-S2==(0,2)&&S1-T1==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2-(0,1)]","SetValue[T2,S2]"}]]
If[showblank==true&&whereto1==true&&((T1-S1==(0,2)&&S2-T2==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P1,T2]","SetValue[T2,S2+(0,1)]"}]]
#方塊2
If[showblank==true&&whereto2==true&&((T2-S2==(0,2)&&S1-T1==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2-(0,1)]","SetValue[T2,S2]"}]]
If[showblank==true&&whereto2==true&&((T1-S1==(0,2)&&S2-T2==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P2,T2]","SetValue[T2,S2+(0,1)]"}]]
#方塊3
If[showblank==true&&whereto3==true&&((T2-S2==(0,2)&&S1-T1==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2-(0,1)]","SetValue[T2,S2]"}]]
If[showblank==true&&whereto3==true&&((T1-S1==(0,2)&&S2-T2==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P3,T2]","SetValue[T2,S2+(0,1)]"}]]
#方塊4
If[showblank==true&&whereto4==true&&((T2-S2==(0,2)&&S1-T1==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2-(0,1)]","SetValue[T2,S2]"}]]
If[showblank==true&&whereto4==true&&((T1-S1==(0,2)&&S2-T2==(0,1))),Execute[{"SetValue[counts,counts+1]","SetValue[P4,T2]","SetValue[T2,S2+(0,1)]"}]]
#方塊5
If[showblank==true&&whereto5==true&&(T2-S2==(2,0)&&T1-S1==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,S2+(1,0)]","SetValue[T2,S2]"}]]
If[showblank==true&&whereto5==true&&(T1-S1==(2,0)&&T2-S2==(-1,0)),Execute[{"SetValue[counts,counts+1]","SetValue[P5,T2]","SetValue[T2,S2+(1,0)]"}]]
#方塊6
If[showblank==true&&whereto6==true,Execute[{"SetValue[counts,counts+1]","SetValue[P6,T2]","SetValue[T2,S2]"}]]
#方塊7
If[showblank==true&&whereto7==true,Execute[{"SetValue[counts,counts+1]","SetValue[P7,T2]","SetValue[T2,S2]"}]]
#方塊8
If[showblank==true&&whereto8==true,Execute[{"SetValue[counts,counts+1]","SetValue[P8,T2]","SetValue[T2,S2]"}]]
#方塊9
If[showblank==true&&whereto9==true,Execute[{"SetValue[counts,counts+1]","SetValue[P9,T2]","SetValue[T2,S2]"}]]

SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]"/>
</element>
<element type="boolean" label="showblank">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto1">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto2">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto3">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto4">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto5">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto6">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto7">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto8">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="whereto9">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<expression label="counts" exp="0"/>
<element type="numeric" label="counts">
<value val="0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<tooltipMode val="2"/>
<animation speed="1" type="0" playing="false"/>
</element>
<element type="button" label="button_{layouts}">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<bgColor r="0" g="255" b="0" alpha="255"/>
<layer val="7"/>
<labelOffset x="352" y="612"/>
<labelMode val="3"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="If[showmaps==false,SetValue[showmaps,true],SetValue[showmaps,false]]"/>
<font serif="false" sizeM="1.4" size="10" style="1"/>
<file name="geogebra/gui/images/go-up.png"/>
<dimensions width="150" height="60" />
<startPoint x="3.0432397340227304" y="-0.7794788188396673" z="1"/>
<caption val="新佈局Layouts"/>
</element>
<expression label="whereall" exp="whereto1 ∨ whereto2 ∨ whereto3 ∨ whereto4 ∨ whereto5 ∨ whereto6 ∨ whereto7 ∨ whereto8 ∨ whereto9" />
<element type="boolean" label="whereall">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="showportrait">
<value val="true"/>
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="363" y="593"/>
<labelMode val="3"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
</element>
<command name="Polygon">
<input a0="{(1, 0), (1, -1), (3, -1), (3, 0)}"/>
<output a0="goal"/>
</command>
<element type="polygon" label="goal">
<lineStyle thickness="0" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0.10000000149011612" fillType="4" hatchAngle="45" hatchDistance="5"/>
<layer val="0"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="boolean" label="showname">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="364" y="627"/>
<labelMode val="3"/>
<tooltipMode val="2"/>
<checkbox fixed="true"/>
<caption val="名字 Name"/>
</element>
<expression label="text_{goal}" exp=""出口 Goal""/>
<element type="text" label="text_{goal}">
<show object="true" label="false" ev="40"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="8"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<font serif="false" sizeM="1.4" size="10" style="1"/>
<startPoint x="1.2" y="-1.3" z="1"/>
</element>
<expression label="text_{rule}" exp=""遊戲方式
以點按的方式來滑動方塊,將
較大的正方形方塊移至出口即
完成遊戲。

Game Rule
Slide the block by clicking or
tapping it. Move the RED square
block to reach the Goal.

你可以使用不同的開局玩遊戲,
但當前的遊戲進度會被捨棄。

You can play a new game with 
different layouts, but the current
game will be discarded.""/>
<element type="text" label="text_{rule}">
<show object="false" label="true" ev="40"/>
<condition showObject="showrule"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="8"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<font serif="false" sizeM="0.7" size="-8" style="1"/>
<startPoint x="0.7" y="4.4" z="1"/>
</element>
<expression label="A" exp="(0.4, 3)" type="point"/>
<element type="point" label="A">
<show object="false" label="true" ev="4"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="8"/>
<labelMode val="0"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<coords x="0.4" y="3" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Circle">
<input a0="A" a1="0.5"/>
<output a0="c"/>
</command>
<element type="conic" label="c">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="8"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="8.91" A3="0" A4="-0.4" A5="-3"/>
<eqnStyle style="specific"/>
</element>
<command name="Point">
<input a0="c"/>
<output a0="B"/>
</command>
<element type="point" label="B">
<show object="false" label="true" ev="4"/>
<objColor r="125" g="125" b="255" alpha="0"/>
<layer val="8"/>
<labelMode val="0"/>
<animation step="1" speed="3" type="2" playing="true"/>
<selectionAllowed val="false"/>
<coords x="-0.01692320286431337" y="2.7240017338580502" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="{(0.5, 0.2), (0.5, 4.8), (3.5, 4.8), (3.5, 0.2)}"/>
<output a0="poly__rule"/>
</command>
<element type="polygon" label="poly__rule">
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false" ev="4"/>
<condition showObject="showrule"/>
<objColor r="191" g="255" b="0" alpha="0.8999999761581421"/>
<layer val="8"/>
<labelMode val="0"/>
<ggbscript val="showrule=false
SetColor(button_{rule},"Yellow")
"/>
</element>
<expression label="text_{great}" exp="" 拿麼厲害!祝福您
鵬程萬里,金榜題名! 
 You are Genius! ""/>
<element type="text" label="text_{great}">
<show object="true" label="false" ev="40"/>
<condition showObject="y(PA) < 0"/>
<objColor r="0" g="0" b="0" alpha="0" dynamicr="0.5" dynamicg="x(B)" dynamicb="1 - x(B)" colorSpace="0"/>
<bgColor r="255" g="0" b="0" alpha="255"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<font serif="true" sizeM="1.4" size="10" style="1"/>
<startPoint exp="B"/>
<labelOffset x="20" y="6"/>
</element>
<element type="button" label="button_{rule}">
<show object="true" label="true"/>
<objColor r="255" g="255" b="0" alpha="1"/>
<bgColor r="64" g="64" b="64" alpha="255"/>
<layer val="7"/>
<labelOffset x="423" y="20"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="If[showrule==false,SetValue[showrule,true],SetValue[showrule,false]]
If(showrule==false,SetColor(button_{rule},"Yellow"),SetColor(button_{rule},"Gray"))"/>
<font serif="false" sizeM="1.4" size="10" style="1"/>
<startPoint x="3.9" y="5.4" z="1"/>
<caption val="Rule"/>
</element>
<element type="boolean" label="showrule">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="button" label="button_{portrait}">
<show object="true" label="true"/>
<objColor r="255" g="255" b="0" alpha="1"/>
<bgColor r="64" g="64" b="64" alpha="255"/>
<layer val="7"/>
<labelOffset x="246" y="19"/>
<labelMode val="3"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="If[showportrait==false,SetValue[showportrait,true],SetValue[showportrait,false]]
If(showportrait==true,SetColor(button_{portrait},"Yellow"),SetColor(button_{portrait},"Gray"))
"/>
<font serif="false" sizeM="1.4" size="10" style="1"/>
<startPoint x="3" y="5.4" z="1"/>
<caption val="Portrait"/>
</element>
<command name="Polygon">
<input a0="{(-0.5, -0.5), (-0.5, 5.5), (4.5, 5.5), (4.5, -0.5)}"/>
<output a0="maps"/>
</command>
<element type="polygon" label="maps">
<lineStyle thickness="5" type="0" typeHidden="1" opacity="191"/>
<show object="true" label="false" ev="4"/>
<condition showObject="showmaps"/>
<objColor r="160" g="160" b="160" alpha="0.8500000238418579"/>
<layer val="8"/>
<labelMode val="0"/>
<ggbscript val="showmaps=false
"/>
</element>
<expression label="mapno" exp="1"/>
<element type="numeric" label="mapno">
<value val="1"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="8"/>
<labelMode val="1"/>
<tooltipMode val="2"/>
<animation speed="1" type="0" playing="false"/>
</element>
<expression label="showmaps" exp="false"/>
<element type="boolean" label="showmaps">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="wheretopt">
<value val="false"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="101" y="18"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<expression label="text_{counts}" exp=""Step Counts: " + counts + """ />
<element type="text" label="text_{counts}">
<show object="true" label="false" ev="8"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="8"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<font serif="false" sizeM="0.8" size="-5" style="1"/>
<decimals val="0"/>
<startPoint x="-0.4" y="5.2" z="1"/>
</element>
<element type="image" label="q01">
<file name="a5156b4e71ced4af3edeb270a97a721f/三橫二豎-01.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 1, (-0.2, -2), (0, 3.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 1, (0.8, -2), (1, 3.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 1"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<ggbscript val="mapno=1
P1=(0,2)
P2=(3,2)
P3=(1,4)
P4=(0,0)
P5=(2,0)
P6=(0,4)
P7=(3,4)
P8=(0,1)
P9=(3,1)
PA=(1,2)
T1=(1,1)
T2=(2,1)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q01,1))==-2,SetFixed[q01,true,false],SetFixed[q01,true,true])"/>
</element>
<element type="image" label="q02">
<file name="9ea773e8db4d3bda43fe1a2e7a912d17/三橫二豎-02.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 2, (-0.2, -2), (1, 3.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 2, (0.8, -2), (2, 3.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 2"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=2
P1=(0,3)
P2=(3,3)
P3=(1,2)
P4=(1,1)
P5=(1,0)
P6=(0,2)
P7=(0,1)
P8=(3,2)
P9=(3,1)
PA=(1,3)
T1=(0,0)
T2=(3,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q02,1))==-2,SetFixed[q02,true,false],SetFixed[q02,true,true])"/>
</element>
<element type="image" label="pic1">
<file name="e9580427b3ef55e3a64d1ad9253fc209/國文.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P1"/>
<startPoint number="1" exp="P1 + (1, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic2">
<file name="5307a9d0e4c8e2eb7dead8a4d078863e/社會.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P2"/>
<startPoint number="1" exp="P2 + (1, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic3">
<file name="aa94de9ec657afcdc12a6aff926112a3/英文.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P3"/>
<startPoint number="1" exp="P3 + (2, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic4">
<file name="749c98c0129edd8c652a1d51328d6c3d/數學.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P4"/>
<startPoint number="1" exp="P4 + (2, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic5">
<file name="6270c2308a7409f57ff378edda0e2cf5/自然.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P5"/>
<startPoint number="1" exp="P5 + (2, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic6">
<file name="1a807f7cc5e7c3c6a38db9e77985a529/堅.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P6"/>
<startPoint number="1" exp="P6 + (1, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic7">
<file name="6e4f5ba8fecbcb14d40304faafda1228/持.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P7"/>
<startPoint number="1" exp="P7 + (1, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic8">
<file name="7e4218580faba40d3b04e67ee05507df/到.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P8"/>
<startPoint number="1" exp="P8 + (1, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="pic9">
<file name="8f938544f2c4a6b969377456589a2e78/底.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="P9"/>
<startPoint number="1" exp="P9 + (1, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="picA">
<file name="57e3d5ba9c5dc139bbd0eb2c856c5ea0/考生.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="PA"/>
<startPoint number="1" exp="PA + (2, 0)"/>
<show object="true" label="false"/>
<condition showObject="showportrait"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="7"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
</element>
<element type="image" label="q03">
<file name="3da179a6540d93d622334f8f20c82a04/三橫二豎-03.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 3, (-0.2, -2), (2, 3.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 3, (0.8, -2), (3, 3.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 3"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=3
P1=(0,2)
P2=(3,2)
P3=(1,2)
P4=(1,1)
P5=(1,0)
P6=(0,4)
P7=(3,4)
P8=(0,1)
P9=(3,1)
PA=(1,3)
T1=(0,0)
T2=(3,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q03,1))==-2,SetFixed[q03,true,false],SetFixed[q03,true,true])"/>
</element>
<element type="image" label="q04">
<file name="cca96c9f3674beaff2b5c879b6b74564/三橫二豎-04.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 4, (-0.2, -2), (3, 3.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 4, (0.8, -2), (4, 3.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 4"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=4
P1=(0,1)
P2=(3,3)
P3=(1,2)
P4=(1,1)
P5=(1,0)
P6=(0,4)
P7=(3,2)
P8=(0,3)
P9=(3,1)
PA=(1,3)
T1=(0,0)
T2=(3,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q04,1))==-2,SetFixed[q04,true,false],SetFixed[q04,true,true])"/>
</element>
<element type="image" label="q05">
<file name="c1f5fe7b23c5e57b3b45f0a5b3a658f2/三橫二豎-05.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 5, (-0.2, -2), (0, 2)]"/>
<startPoint number="1" exp="If[mapno ≟ 5, (0.8, -2), (1, 2)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 5"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=5
P1=(0,1)
P2=(1,1)
P3=(2,2)
P4=(2,1)
P5=(1,0)
P6=(0,4)
P7=(3,4)
P8=(0,3)
P9=(3,3)
PA=(1,3)
T1=(0,0)
T2=(3,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q05,1))==-2,SetFixed[q05,true,false],SetFixed[q05,true,true])"/>
</element>
<element type="image" label="q06">
<file name="e28cc357c29f2df343da7c03d94861cc/三橫二豎-06.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 6, (-0.2, -2), (1, 2)]"/>
<startPoint number="1" exp="If[mapno ≟ 6, (0.8, -2), (2, 2)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 6"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=6
P1=(0,3)
P2=(3,3)
P3=(0,2)
P4=(2,2)
P5=(1,1)
P6=(0,1)
P7=(0,0)
P8=(3,1)
P9=(3,0)
PA=(1,3)
T1=(1,0)
T2=(2,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q06,1))==-2,SetFixed[q06,true,false],SetFixed[q06,true,true])"/>
</element>
<element type="image" label="q07">
<file name="e71a74922244089d8f00749643c2fe41/三橫二豎-07.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 7, (-0.2, -2), (2, 2)]"/>
<startPoint number="1" exp="If[mapno ≟ 7, (0.8, -2), (3, 2)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 7"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=7
P1=(0,3)
P2=(3,3)
P3=(1,2)
P4=(0,1)
P5=(2,1)
P6=(0,2)
P7=(3,2)
P8=(0,0)
P9=(3,0)
PA=(1,3)
T1=(1,0)
T2=(2,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q07,1))==-2,SetFixed[q07,true,false],SetFixed[q07,true,true])"/>
</element>
<element type="image" label="q08">
<file name="7db91636327e490302f34ec10f938531/三橫二豎-08.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 8, (-0.2, -2), (3, 2)]"/>
<startPoint number="1" exp="If[mapno ≟ 8, (0.8, -2), (4, 2)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 8"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=8
P1=(0,2)
P2=(3,2)
P3=(0,4)
P4=(2,4)
P5=(1,1)
P6=(0,1)
P7=(3,1)
P8=(0,0)
P9=(3,0)
PA=(1,2)
T1=(1,0)
T2=(2,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q08,1))==-2,SetFixed[q08,true,false],SetFixed[q08,true,true])"/>
</element>
<element type="image" label="q09">
<file name="c2ccb43037c85d7e45203229cd78c27a/三橫二豎-09.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 9, (-0.2, -2), (0, 0.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 9, (0.8, -2), (1, 0.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 9"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=9
P1=(2,3)
P2=(3,3)
P3=(0,2)
P4=(2,2)
P5=(1,1)
P6=(0,1)
P7=(3,1)
P8=(0,0)
P9=(3,0)
PA=(0,3)
T1=(1,0)
T2=(2,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q09,1))==-2,SetFixed[q09,true,false],SetFixed[q09,true,true])"/>
</element>
<element type="image" label="q10">
<file name="0f526c0ddae93ce57051e44a7427ea83/三橫二豎-10.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 10, (-0.2, -2), (1, 0.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 10, (0.8, -2), (2, 0.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 10"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=10
P1=(0,1)
P2=(1,1)
P3=(2,4)
P4=(2,3)
P5=(2,2)
P6=(2,1)
P7=(3,1)
P8=(0,0)
P9=(3,0)
PA=(0,3)
T1=(1,0)
T2=(2,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q10,1))==-2,SetFixed[q10,true,false],SetFixed[q10,true,true])"/>
</element>
<element type="image" label="q11">
<file name="913f67e45ca1ec91e2c1e4b495982f8d/三橫二豎-11.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="If[mapno ≟ 11, (-0.2, -2), (2, 0.5)]"/>
<startPoint number="1" exp="If[mapno ≟ 11, (0.8, -2), (3, 0.5)]"/>
<show object="true" label="false"/>
<condition showObject="showmaps ∨ mapno ≟ 11"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="9"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<fixed val="true"/>
<ggbscript val="mapno=11
P1=(0,2)
P2=(3,2)
P3=(1,4)
P4=(1,1)
P5=(1,0)
P6=(0,4)
P7=(3,4)
P8=(0,1)
P9=(3,1)
PA=(1,2)
T1=(0,0)
T2=(3,0)
counts=0
StartAnimation(false)
SetValue[showblank,false]
SetValue[whereto1,false]
SetValue[whereto2,false]
SetValue[whereto3,false]
SetValue[whereto4,false]
SetValue[whereto5,false]
SetValue[whereto6,false]
SetValue[whereto7,false]
SetValue[whereto8,false]
SetValue[whereto9,false]
showmaps=false"/>
<ggbscript onUpdate="If(y(Corner(q11,1))==-2,SetFixed[q11,true,false],SetFixed[q11,true,true])"/>
</element>
<element type="button" label="button_{restart}">
<show object="true" label="true"/>
<condition showObject="showmaps"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<bgColor r="0" g="255" b="0" alpha="255"/>
<layer val="9"/>
<labelOffset x="60" y="537"/>
<labelMode val="3"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
<ggbscript val="If[mapno==1,RunClickScript(q01)]
If[mapno==2,RunClickScript(q02)]
If[mapno==3,RunClickScript(q03)]
If[mapno==4,RunClickScript(q04)]
If[mapno==5,RunClickScript(q05)]
If[mapno==6,RunClickScript(q06)]
If[mapno==7,RunClickScript(q07)]
If[mapno==8,RunClickScript(q08)]
If[mapno==9,RunClickScript(q09)]
If[mapno==10,RunClickScript(q10)]
If[mapno==11,RunClickScript(q11)]"/>
<font serif="false" sizeM="1.4" size="10" style="1"/>
<dimensions width="147" height="30" />
<startPoint x="-0.0030202893236448655" y="0.0029509816773811747" z="1"/>
<caption val="這局重來 Restart"/>
</element>
<element type="button" label="button_{cancel}">
<show object="true" label="true"/>
<condition showObject="showmaps"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<bgColor r="224" g="224" b="224" alpha="255"/>
<layer val="9"/>
<labelOffset x="281" y="537"/>
<labelMode val="0"/>
<tooltipMode val="2"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
<ggbscript val="showmaps=false
"/>
<font serif="false" sizeM="1.4" size="10" style="1"/>
<dimensions width="150" height="30" />
<startPoint x="2.3" y="0" z="1"/>
<caption val="繼續遊戲 Cancel"/>
</element>
</construction>
</geogebra>