home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / TowerOfHanoy.dxr / 00006_GameMovie.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  30.0 KB  |  992 lines

  1. global gLeftTowerList, gCenterTowerList, gRightTowerList, gReleaseBall, gLevel, gDiscNum, gPosX, gPosY, gOriginX, gOriginY, gCheckList, gStackSide, gPlaced, gSingle, gMoves, gMoveFix, gPoints, gConstant
  2.  
  3. on prepareMovie
  4.   gLeftTowerList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  5.   gCenterTowerList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  6.   gRightTowerList = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  7.   gLevel = 1
  8.   member("DiscsText").text = string(gLevel + 2)
  9.   gDiscNum = 20
  10.   gPosX = 100
  11.   gPosY = 150
  12.   gLeftTowerList[1] = 18
  13.   gLeftTowerList[2] = 19
  14.   gCheckList = 1
  15.   gStackSide = 4
  16.   gPlaced = 0
  17.   gReleaseBall = 1
  18.   gSingle = 0
  19.   gConstant = 7
  20.   gMoves = 0
  21.   gMoveFix = 1
  22.   member("MovesText").text = string(gMoves)
  23.   gPoints = 0
  24.   member("PointsText").text = string(integer(gPoints))
  25.   sprite(22).visible = 1
  26.   sprite(23).visible = 1
  27.   sprite(24).visible = 1
  28.   sprite(25).visible = 1
  29.   sprite(26).visible = 1
  30.   sprite(20).visible = 1
  31.   sprite(19).visible = 1
  32.   sprite(18).visible = 1
  33.   sprite(17).visible = 0
  34.   sprite(16).visible = 0
  35.   sprite(15).visible = 0
  36.   sprite(14).visible = 0
  37.   sprite(13).visible = 0
  38.   sprite(12).visible = 0
  39.   sprite(11).visible = 0
  40.   stack()
  41. end
  42.  
  43. on MovePiece
  44.   if gReleaseBall = 0 then
  45.     sprite(gDiscNum).loc = the mouseLoc
  46.     gPosX = the mouseH
  47.     gPosY = the mouseV
  48.   end if
  49. end
  50.  
  51. on checkwin
  52.   if gLevel = 1 then
  53.     if (gRightTowerList[1] = 18) and (gRightTowerList[2] = 19) and (gRightTowerList[3] = 20) then
  54.       sprite(22).visible = 1
  55.       sprite(23).visible = 1
  56.       sprite(24).visible = 1
  57.       sprite(25).visible = 1
  58.       sprite(26).visible = 1
  59.       puppetSound(5, "levelcomplete")
  60.       if gLevel >= 2 then
  61.         gConstant = (gConstant * 2) + 1
  62.       end if
  63.       gPoints = gPoints + ((gConstant * 2 * 100) - (gMoves * 100))
  64.       if gPoints <= 0 then
  65.         gPoints = 100
  66.       end if
  67.       member("completeText1").text = "Level Points:" && string(gPoints)
  68.       member("completeText2").text = "Level Points:" && string(gPoints)
  69.       member("PointsText").text = string(gPoints)
  70.       go(11)
  71.     end if
  72.   else
  73.     if gLevel = 2 then
  74.       if (gRightTowerList[1] = 17) and (gRightTowerList[2] = 18) and (gRightTowerList[3] = 19) and (gRightTowerList[4] = 20) then
  75.         sprite(22).visible = 1
  76.         sprite(23).visible = 1
  77.         sprite(24).visible = 1
  78.         sprite(25).visible = 1
  79.         sprite(26).visible = 1
  80.         puppetSound(5, "levelcomplete")
  81.         if gLevel >= 2 then
  82.           gConstant = (gConstant * 2) + 1
  83.         end if
  84.         gPoints = gPoints + ((gConstant * 2 * 100) - (gMoves * 100))
  85.         if gPoints <= 0 then
  86.           gPoints = 100
  87.         end if
  88.         member("completeText1").text = "Level Points:" && string(gPoints)
  89.         member("completeText2").text = "Level Points:" && string(gPoints)
  90.         member("PointsText").text = string(gPoints)
  91.         go(21)
  92.       end if
  93.     else
  94.       if gLevel = 3 then
  95.         if (gRightTowerList[1] = 16) and (gRightTowerList[2] = 17) and (gRightTowerList[3] = 18) and (gRightTowerList[4] = 19) and (gRightTowerList[5] = 20) then
  96.           sprite(22).visible = 1
  97.           sprite(23).visible = 1
  98.           sprite(24).visible = 1
  99.           sprite(25).visible = 1
  100.           sprite(26).visible = 1
  101.           puppetSound(5, "levelcomplete")
  102.           if gLevel >= 2 then
  103.             gConstant = (gConstant * 2) + 1
  104.           end if
  105.           gPoints = gPoints + ((gConstant * 2 * 100) - (gMoves * 100))
  106.           if gPoints <= 0 then
  107.             gPoints = 100
  108.           end if
  109.           member("completeText1").text = "Level Points:" && string(gPoints)
  110.           member("completeText2").text = "Level Points:" && string(gPoints)
  111.           member("PointsText").text = string(gPoints)
  112.           go(27)
  113.         end if
  114.       else
  115.         if gLevel = 4 then
  116.           if (gRightTowerList[1] = 15) and (gRightTowerList[2] = 16) and (gRightTowerList[3] = 17) and (gRightTowerList[4] = 18) and (gRightTowerList[5] = 19) and (gRightTowerList[6] = 20) then
  117.             sprite(22).visible = 1
  118.             sprite(23).visible = 1
  119.             sprite(24).visible = 1
  120.             sprite(25).visible = 1
  121.             sprite(26).visible = 1
  122.             puppetSound(5, "levelcomplete")
  123.             if gLevel >= 2 then
  124.               gConstant = (gConstant * 2) + 1
  125.             end if
  126.             gPoints = gPoints + ((gConstant * 2 * 100) - (gMoves * 100))
  127.             if gPoints <= 0 then
  128.               gPoints = 100
  129.             end if
  130.             member("completeText1").text = "Level Points:" && string(gPoints)
  131.             member("completeText2").text = "Level Points:" && string(gPoints)
  132.             member("PointsText").text = string(gPoints)
  133.             go(37)
  134.           end if
  135.         else
  136.           if gLevel = 5 then
  137.             if (gRightTowerList[1] = 14) and (gRightTowerList[2] = 15) and (gRightTowerList[3] = 16) and (gRightTowerList[4] = 17) and (gRightTowerList[5] = 18) and (gRightTowerList[6] = 19) and (gRightTowerList[7] = 20) then
  138.               sprite(22).visible = 1
  139.               sprite(23).visible = 1
  140.               sprite(24).visible = 1
  141.               sprite(25).visible = 1
  142.               sprite(26).visible = 1
  143.               sprite(27).visible = 1
  144.               sprite(28).visible = 1
  145.               puppetSound(5, "levelcomplete")
  146.               if gLevel >= 2 then
  147.                 gConstant = (gConstant * 2) + 1
  148.               end if
  149.               gPoints = gPoints + ((gConstant * 2 * 100) - (gMoves * 100))
  150.               if gPoints <= 0 then
  151.                 gPoints = 100
  152.               end if
  153.               member("completeText1").text = "Level Points:" && string(gPoints)
  154.               member("completeText2").text = "Level Points:" && string(gPoints)
  155.               member("PointsText").text = string(gPoints)
  156.               go(42)
  157.             end if
  158.           else
  159.             if gLevel = 6 then
  160.               if (gRightTowerList[1] = 13) and (gRightTowerList[2] = 14) and (gRightTowerList[3] = 15) and (gRightTowerList[4] = 16) and (gRightTowerList[5] = 17) and (gRightTowerList[6] = 18) and (gRightTowerList[7] = 19) and (gRightTowerList[8] = 20) then
  161.                 sprite(22).visible = 1
  162.                 sprite(23).visible = 1
  163.                 sprite(24).visible = 1
  164.                 sprite(25).visible = 1
  165.                 sprite(26).visible = 1
  166.                 sprite(27).visible = 1
  167.                 sprite(28).visible = 1
  168.                 puppetSound(5, "win")
  169.                 if gLevel >= 2 then
  170.                   gConstant = (gConstant * 2) + 1
  171.                 end if
  172.                 gPoints = gPoints + ((gConstant * 2 * 100) - (gMoves * 100))
  173.                 if gPoints <= 0 then
  174.                   gPoints = 100
  175.                 end if
  176.                 member("completeText1").text = "Total Points:" && string(gPoints)
  177.                 member("completeText2").text = "Total Points:" && string(gPoints)
  178.                 member("PointsText").text = string(gPoints)
  179.                 puppetSound(3, "youwin")
  180.                 go(47)
  181.               end if
  182.             end if
  183.           end if
  184.         end if
  185.       end if
  186.     end if
  187.   end if
  188. end
  189.  
  190. on stack
  191.   if (gPosX >= 15) and (gPosX <= 185) and ((gPosY >= 110) and (gPosY <= 385)) then
  192.     CheckLeftStackOrder()
  193.     if gLeftTowerList[1] <> 0 then
  194.       gPlaced = 1
  195.       if gStackSide <> 4 then
  196.         if gMoveFix = 1 then
  197.           gMoves = gMoves + 1
  198.           member("MovesText").text = string(gMoves)
  199.           gMoveFix = 0
  200.         end if
  201.       end if
  202.       if gLeftTowerList[1] = 20 then
  203.         sprite(20).loc = point(100, 352)
  204.       end if
  205.       if gLeftTowerList[1] = 19 then
  206.         sprite(19).loc = point(100, 352)
  207.       end if
  208.       if gLeftTowerList[1] = 18 then
  209.         sprite(18).loc = point(100, 352)
  210.       end if
  211.       if gLeftTowerList[1] = 17 then
  212.         sprite(17).loc = point(100, 352)
  213.       end if
  214.       if gLeftTowerList[1] = 16 then
  215.         sprite(16).loc = point(100, 352)
  216.       end if
  217.       if gLeftTowerList[1] = 15 then
  218.         sprite(15).loc = point(100, 352)
  219.       end if
  220.       if gLeftTowerList[1] = 14 then
  221.         sprite(14).loc = point(100, 352)
  222.       end if
  223.     end if
  224.     if gLeftTowerList[2] <> 0 then
  225.       gPlaced = 1
  226.       if gStackSide <> 4 then
  227.         if gMoveFix = 1 then
  228.           gMoves = gMoves + 1
  229.           member("MovesText").text = string(gMoves)
  230.           gMoveFix = 0
  231.         end if
  232.       end if
  233.       if gLeftTowerList[2] = 20 then
  234.         sprite(20).loc = point(100, 334)
  235.       end if
  236.       if gLeftTowerList[2] = 19 then
  237.         sprite(19).loc = point(100, 334)
  238.       end if
  239.       if gLeftTowerList[2] = 18 then
  240.         sprite(18).loc = point(100, 334)
  241.       end if
  242.       if gLeftTowerList[2] = 17 then
  243.         sprite(17).loc = point(100, 334)
  244.       end if
  245.       if gLeftTowerList[2] = 16 then
  246.         sprite(16).loc = point(100, 334)
  247.       end if
  248.       if gLeftTowerList[2] = 15 then
  249.         sprite(15).loc = point(100, 334)
  250.       end if
  251.       if gLeftTowerList[2] = 14 then
  252.         sprite(14).loc = point(100, 334)
  253.       end if
  254.     end if
  255.     if gLeftTowerList[3] <> 0 then
  256.       gPlaced = 1
  257.       if gStackSide <> 4 then
  258.         if gMoveFix = 1 then
  259.           gMoves = gMoves + 1
  260.           member("MovesText").text = string(gMoves)
  261.           gMoveFix = 0
  262.         end if
  263.       end if
  264.       if gLeftTowerList[3] = 20 then
  265.         sprite(20).loc = point(100, 316)
  266.       end if
  267.       if gLeftTowerList[3] = 19 then
  268.         sprite(19).loc = point(100, 316)
  269.       end if
  270.       if gLeftTowerList[3] = 18 then
  271.         sprite(18).loc = point(100, 316)
  272.       end if
  273.       if gLeftTowerList[3] = 17 then
  274.         sprite(17).loc = point(100, 316)
  275.       end if
  276.       if gLeftTowerList[3] = 16 then
  277.         sprite(16).loc = point(100, 316)
  278.       end if
  279.       if gLeftTowerList[3] = 15 then
  280.         sprite(15).loc = point(100, 316)
  281.       end if
  282.       if gLeftTowerList[3] = 14 then
  283.         sprite(14).loc = point(100, 316)
  284.       end if
  285.     end if
  286.     if gLeftTowerList[4] <> 0 then
  287.       gPlaced = 1
  288.       if gStackSide <> 4 then
  289.         if gMoveFix = 1 then
  290.           gMoves = gMoves + 1
  291.           member("MovesText").text = string(gMoves)
  292.           gMoveFix = 0
  293.         end if
  294.       end if
  295.       if gLeftTowerList[4] = 20 then
  296.         sprite(20).loc = point(100, 298)
  297.       end if
  298.       if gLeftTowerList[4] = 19 then
  299.         sprite(19).loc = point(100, 298)
  300.       end if
  301.       if gLeftTowerList[4] = 18 then
  302.         sprite(18).loc = point(100, 298)
  303.       end if
  304.       if gLeftTowerList[4] = 17 then
  305.         sprite(17).loc = point(100, 298)
  306.       end if
  307.       if gLeftTowerList[4] = 16 then
  308.         sprite(16).loc = point(100, 298)
  309.       end if
  310.       if gLeftTowerList[4] = 15 then
  311.         sprite(15).loc = point(100, 298)
  312.       end if
  313.       if gLeftTowerList[4] = 14 then
  314.         sprite(14).loc = point(100, 298)
  315.       end if
  316.     end if
  317.     if gLeftTowerList[5] <> 0 then
  318.       gPlaced = 1
  319.       if gStackSide <> 4 then
  320.         if gMoveFix = 1 then
  321.           gMoves = gMoves + 1
  322.           member("MovesText").text = string(gMoves)
  323.           gMoveFix = 0
  324.         end if
  325.       end if
  326.       if gLeftTowerList[5] = 20 then
  327.         sprite(20).loc = point(100, 280)
  328.       end if
  329.       if gLeftTowerList[5] = 19 then
  330.         sprite(19).loc = point(100, 280)
  331.       end if
  332.       if gLeftTowerList[5] = 18 then
  333.         sprite(18).loc = point(100, 280)
  334.       end if
  335.       if gLeftTowerList[5] = 17 then
  336.         sprite(17).loc = point(100, 280)
  337.       end if
  338.       if gLeftTowerList[5] = 16 then
  339.         sprite(16).loc = point(100, 280)
  340.       end if
  341.       if gLeftTowerList[5] = 15 then
  342.         sprite(15).loc = point(100, 280)
  343.       end if
  344.       if gLeftTowerList[5] = 14 then
  345.         sprite(14).loc = point(100, 280)
  346.       end if
  347.     end if
  348.     if gLeftTowerList[6] <> 0 then
  349.       gPlaced = 1
  350.       if gStackSide <> 4 then
  351.         if gMoveFix = 1 then
  352.           gMoves = gMoves + 1
  353.           member("MovesText").text = string(gMoves)
  354.           gMoveFix = 0
  355.         end if
  356.       end if
  357.       if gLeftTowerList[6] = 20 then
  358.         sprite(20).loc = point(100, 262)
  359.       end if
  360.       if gLeftTowerList[6] = 19 then
  361.         sprite(19).loc = point(100, 262)
  362.       end if
  363.       if gLeftTowerList[6] = 18 then
  364.         sprite(18).loc = point(100, 262)
  365.       end if
  366.       if gLeftTowerList[6] = 17 then
  367.         sprite(17).loc = point(100, 262)
  368.       end if
  369.       if gLeftTowerList[6] = 16 then
  370.         sprite(16).loc = point(100, 262)
  371.       end if
  372.       if gLeftTowerList[6] = 15 then
  373.         sprite(15).loc = point(100, 262)
  374.       end if
  375.       if gLeftTowerList[6] = 14 then
  376.         sprite(14).loc = point(100, 262)
  377.       end if
  378.     end if
  379.     if gLeftTowerList[7] <> 0 then
  380.       gPlaced = 1
  381.       if gStackSide <> 4 then
  382.         if gMoveFix = 1 then
  383.           gMoves = gMoves + 1
  384.           member("MovesText").text = string(gMoves)
  385.           gMoveFix = 0
  386.         end if
  387.       end if
  388.       if gLeftTowerList[7] = 20 then
  389.         sprite(20).loc = point(100, 244)
  390.       end if
  391.       if gLeftTowerList[7] = 19 then
  392.         sprite(19).loc = point(100, 244)
  393.       end if
  394.       if gLeftTowerList[7] = 18 then
  395.         sprite(18).loc = point(100, 244)
  396.       end if
  397.       if gLeftTowerList[7] = 17 then
  398.         sprite(17).loc = point(100, 244)
  399.       end if
  400.       if gLeftTowerList[7] = 16 then
  401.         sprite(16).loc = point(100, 244)
  402.       end if
  403.       if gLeftTowerList[7] = 15 then
  404.         sprite(15).loc = point(100, 244)
  405.       end if
  406.       if gLeftTowerList[7] = 14 then
  407.         sprite(14).loc = point(100, 244)
  408.       end if
  409.     end if
  410.   else
  411.     if (gPosX >= 202) and (gPosX <= 375) and ((gPosY >= 110) and (gPosY <= 385)) then
  412.       gPlaced = 1
  413.       CheckCenterStackOrder()
  414.       if gStackSide <> 5 then
  415.         if gMoveFix = 1 then
  416.           gMoves = gMoves + 1
  417.           member("MovesText").text = string(gMoves)
  418.           gMoveFix = 0
  419.         end if
  420.       end if
  421.       if gCenterTowerList[1] <> 0 then
  422.         if gCenterTowerList[1] = 20 then
  423.           sprite(20).loc = point(288, 352)
  424.         end if
  425.         if gCenterTowerList[1] = 19 then
  426.           sprite(19).loc = point(288, 352)
  427.         end if
  428.         if gCenterTowerList[1] = 18 then
  429.           sprite(18).loc = point(288, 352)
  430.         end if
  431.         if gCenterTowerList[1] = 17 then
  432.           sprite(17).loc = point(288, 352)
  433.         end if
  434.         if gCenterTowerList[1] = 16 then
  435.           sprite(16).loc = point(288, 352)
  436.         end if
  437.         if gCenterTowerList[1] = 15 then
  438.           sprite(15).loc = point(288, 352)
  439.         end if
  440.         if gCenterTowerList[1] = 14 then
  441.           sprite(14).loc = point(288, 352)
  442.         end if
  443.       end if
  444.       if gCenterTowerList[2] <> 0 then
  445.         gPlaced = 1
  446.         if gStackSide <> 5 then
  447.           if gMoveFix = 1 then
  448.             gMoves = gMoves + 1
  449.             member("MovesText").text = string(gMoves)
  450.             gMoveFix = 0
  451.           end if
  452.         end if
  453.         if gCenterTowerList[2] = 20 then
  454.           sprite(20).loc = point(288, 334)
  455.         end if
  456.         if gCenterTowerList[2] = 19 then
  457.           sprite(19).loc = point(288, 334)
  458.         end if
  459.         if gCenterTowerList[2] = 18 then
  460.           sprite(18).loc = point(288, 334)
  461.         end if
  462.         if gCenterTowerList[2] = 17 then
  463.           sprite(17).loc = point(288, 334)
  464.         end if
  465.         if gCenterTowerList[2] = 16 then
  466.           sprite(16).loc = point(288, 334)
  467.         end if
  468.         if gCenterTowerList[2] = 15 then
  469.           sprite(15).loc = point(288, 334)
  470.         end if
  471.         if gCenterTowerList[2] = 14 then
  472.           sprite(14).loc = point(288, 334)
  473.         end if
  474.       end if
  475.       if gCenterTowerList[3] <> 0 then
  476.         gPlaced = 1
  477.         if gStackSide <> 5 then
  478.           if gMoveFix = 1 then
  479.             gMoves = gMoves + 1
  480.             member("MovesText").text = string(gMoves)
  481.             gMoveFix = 0
  482.           end if
  483.         end if
  484.         if gCenterTowerList[3] = 20 then
  485.           sprite(20).loc = point(288, 316)
  486.         end if
  487.         if gCenterTowerList[3] = 19 then
  488.           sprite(19).loc = point(288, 316)
  489.         end if
  490.         if gCenterTowerList[3] = 18 then
  491.           sprite(18).loc = point(288, 316)
  492.         end if
  493.         if gCenterTowerList[3] = 17 then
  494.           sprite(17).loc = point(288, 316)
  495.         end if
  496.         if gCenterTowerList[3] = 16 then
  497.           sprite(16).loc = point(288, 316)
  498.         end if
  499.         if gCenterTowerList[3] = 15 then
  500.           sprite(15).loc = point(288, 316)
  501.         end if
  502.         if gCenterTowerList[3] = 14 then
  503.           sprite(14).loc = point(288, 316)
  504.         end if
  505.       end if
  506.       if gCenterTowerList[4] <> 0 then
  507.         gPlaced = 1
  508.         if gStackSide <> 5 then
  509.           if gMoveFix = 1 then
  510.             gMoves = gMoves + 1
  511.             member("MovesText").text = string(gMoves)
  512.             gMoveFix = 0
  513.           end if
  514.         end if
  515.         if gCenterTowerList[4] = 20 then
  516.           sprite(20).loc = point(288, 298)
  517.         end if
  518.         if gCenterTowerList[4] = 19 then
  519.           sprite(19).loc = point(288, 298)
  520.         end if
  521.         if gCenterTowerList[4] = 18 then
  522.           sprite(18).loc = point(288, 298)
  523.         end if
  524.         if gCenterTowerList[4] = 17 then
  525.           sprite(17).loc = point(288, 298)
  526.         end if
  527.         if gCenterTowerList[4] = 16 then
  528.           sprite(16).loc = point(288, 298)
  529.         end if
  530.         if gCenterTowerList[4] = 15 then
  531.           sprite(15).loc = point(288, 298)
  532.         end if
  533.         if gCenterTowerList[4] = 14 then
  534.           sprite(14).loc = point(288, 298)
  535.         end if
  536.       end if
  537.       if gCenterTowerList[5] <> 0 then
  538.         gPlaced = 1
  539.         if gStackSide <> 5 then
  540.           if gMoveFix = 1 then
  541.             gMoves = gMoves + 1
  542.             member("MovesText").text = string(gMoves)
  543.             gMoveFix = 0
  544.           end if
  545.         end if
  546.         if gCenterTowerList[5] = 20 then
  547.           sprite(20).loc = point(288, 280)
  548.         end if
  549.         if gCenterTowerList[5] = 19 then
  550.           sprite(19).loc = point(288, 280)
  551.         end if
  552.         if gCenterTowerList[5] = 18 then
  553.           sprite(18).loc = point(288, 280)
  554.         end if
  555.         if gCenterTowerList[5] = 17 then
  556.           sprite(17).loc = point(288, 280)
  557.         end if
  558.         if gCenterTowerList[5] = 16 then
  559.           sprite(16).loc = point(288, 280)
  560.         end if
  561.         if gCenterTowerList[5] = 15 then
  562.           sprite(15).loc = point(288, 280)
  563.         end if
  564.         if gCenterTowerList[5] = 14 then
  565.           sprite(14).loc = point(288, 280)
  566.         end if
  567.       end if
  568.       if gCenterTowerList[6] <> 0 then
  569.         gPlaced = 1
  570.         if gStackSide <> 5 then
  571.           if gMoveFix = 1 then
  572.             gMoves = gMoves + 1
  573.             member("MovesText").text = string(gMoves)
  574.             gMoveFix = 0
  575.           end if
  576.         end if
  577.         if gCenterTowerList[6] = 20 then
  578.           sprite(20).loc = point(288, 262)
  579.         end if
  580.         if gCenterTowerList[6] = 19 then
  581.           sprite(19).loc = point(288, 262)
  582.         end if
  583.         if gCenterTowerList[6] = 18 then
  584.           sprite(18).loc = point(288, 262)
  585.         end if
  586.         if gCenterTowerList[6] = 17 then
  587.           sprite(17).loc = point(288, 262)
  588.         end if
  589.         if gCenterTowerList[6] = 16 then
  590.           sprite(16).loc = point(288, 262)
  591.         end if
  592.         if gCenterTowerList[6] = 15 then
  593.           sprite(15).loc = point(288, 262)
  594.         end if
  595.         if gCenterTowerList[6] = 14 then
  596.           sprite(14).loc = point(288, 262)
  597.         end if
  598.       end if
  599.       if gCenterTowerList[7] <> 0 then
  600.         gPlaced = 1
  601.         if gStackSide <> 4 then
  602.           if gMoveFix = 1 then
  603.             gMoves = gMoves + 1
  604.             member("MovesText").text = string(gMoves)
  605.             gMoveFix = 0
  606.           end if
  607.         end if
  608.         if gCenterTowerList[7] = 20 then
  609.           sprite(20).loc = point(288, 244)
  610.         end if
  611.         if gCenterTowerList[7] = 19 then
  612.           sprite(19).loc = point(288, 244)
  613.         end if
  614.         if gCenterTowerList[7] = 18 then
  615.           sprite(18).loc = point(288, 244)
  616.         end if
  617.         if gCenterTowerList[7] = 17 then
  618.           sprite(17).loc = point(288, 244)
  619.         end if
  620.         if gCenterTowerList[7] = 16 then
  621.           sprite(16).loc = point(288, 244)
  622.         end if
  623.         if gCenterTowerList[7] = 15 then
  624.           sprite(15).loc = point(288, 244)
  625.         end if
  626.         if gCenterTowerList[7] = 14 then
  627.           sprite(14).loc = point(288, 244)
  628.         end if
  629.       end if
  630.     else
  631.       if (gPosX >= 388) and (gPosX <= 561) and ((gPosY >= 110) and (gPosY <= 385)) then
  632.         gPlaced = 1
  633.         CheckRightStackOrder()
  634.         if gRightTowerList[1] <> 0 then
  635.           if gStackSide <> 6 then
  636.             if gMoveFix = 1 then
  637.               gMoves = gMoves + 1
  638.               member("MovesText").text = string(gMoves)
  639.               gMoveFix = 0
  640.             end if
  641.           end if
  642.           if gRightTowerList[1] = 20 then
  643.             sprite(20).loc = point(476, 352)
  644.           end if
  645.           if gRightTowerList[1] = 19 then
  646.             sprite(19).loc = point(476, 352)
  647.           end if
  648.           if gRightTowerList[1] = 18 then
  649.             sprite(18).loc = point(476, 352)
  650.           end if
  651.           if gRightTowerList[1] = 17 then
  652.             sprite(17).loc = point(476, 352)
  653.           end if
  654.           if gRightTowerList[1] = 16 then
  655.             sprite(16).loc = point(476, 352)
  656.           end if
  657.           if gRightTowerList[1] = 15 then
  658.             sprite(15).loc = point(476, 352)
  659.           end if
  660.           if gRightTowerList[1] = 14 then
  661.             sprite(14).loc = point(476, 352)
  662.           end if
  663.         end if
  664.         if gRightTowerList[2] <> 0 then
  665.           gPlaced = 1
  666.           if gStackSide <> 6 then
  667.             if gMoveFix = 1 then
  668.               gMoves = gMoves + 1
  669.               member("MovesText").text = string(gMoves)
  670.               gMoveFix = 0
  671.             end if
  672.           end if
  673.           if gRightTowerList[2] = 20 then
  674.             sprite(20).loc = point(476, 334)
  675.           end if
  676.           if gRightTowerList[2] = 19 then
  677.             sprite(19).loc = point(476, 334)
  678.           end if
  679.           if gRightTowerList[2] = 18 then
  680.             sprite(18).loc = point(476, 334)
  681.           end if
  682.           if gRightTowerList[2] = 17 then
  683.             sprite(17).loc = point(476, 334)
  684.           end if
  685.           if gRightTowerList[2] = 16 then
  686.             sprite(16).loc = point(476, 334)
  687.           end if
  688.           if gRightTowerList[2] = 15 then
  689.             sprite(15).loc = point(476, 334)
  690.           end if
  691.           if gRightTowerList[2] = 14 then
  692.             sprite(14).loc = point(476, 334)
  693.           end if
  694.         end if
  695.         if gRightTowerList[3] <> 0 then
  696.           gPlaced = 1
  697.           if gStackSide <> 6 then
  698.             if gMoveFix = 1 then
  699.               gMoves = gMoves + 1
  700.               member("MovesText").text = string(gMoves)
  701.               gMoveFix = 0
  702.             end if
  703.           end if
  704.           if gRightTowerList[3] = 20 then
  705.             sprite(20).loc = point(476, 316)
  706.           end if
  707.           if gRightTowerList[3] = 19 then
  708.             sprite(19).loc = point(476, 316)
  709.           end if
  710.           if gRightTowerList[3] = 18 then
  711.             sprite(18).loc = point(476, 316)
  712.           end if
  713.           if gRightTowerList[3] = 17 then
  714.             sprite(17).loc = point(476, 316)
  715.           end if
  716.           if gRightTowerList[3] = 16 then
  717.             sprite(16).loc = point(476, 316)
  718.           end if
  719.           if gRightTowerList[3] = 15 then
  720.             sprite(15).loc = point(476, 316)
  721.           end if
  722.           if gRightTowerList[3] = 14 then
  723.             sprite(14).loc = point(476, 316)
  724.           end if
  725.         end if
  726.         if gRightTowerList[4] <> 0 then
  727.           gPlaced = 1
  728.           if gStackSide <> 6 then
  729.             if gMoveFix = 1 then
  730.               gMoves = gMoves + 1
  731.               member("MovesText").text = string(gMoves)
  732.               gMoveFix = 0
  733.             end if
  734.           end if
  735.           if gRightTowerList[4] = 20 then
  736.             sprite(20).loc = point(476, 298)
  737.           end if
  738.           if gRightTowerList[4] = 19 then
  739.             sprite(19).loc = point(476, 298)
  740.           end if
  741.           if gRightTowerList[4] = 18 then
  742.             sprite(18).loc = point(476, 298)
  743.           end if
  744.           if gRightTowerList[4] = 17 then
  745.             sprite(17).loc = point(476, 298)
  746.           end if
  747.           if gRightTowerList[4] = 16 then
  748.             sprite(16).loc = point(476, 298)
  749.           end if
  750.           if gRightTowerList[4] = 15 then
  751.             sprite(15).loc = point(476, 298)
  752.           end if
  753.           if gRightTowerList[4] = 14 then
  754.             sprite(14).loc = point(476, 298)
  755.           end if
  756.         end if
  757.         if gRightTowerList[5] <> 0 then
  758.           gPlaced = 1
  759.           if gStackSide <> 6 then
  760.             if gMoveFix = 1 then
  761.               gMoves = gMoves + 1
  762.               member("MovesText").text = string(gMoves)
  763.               gMoveFix = 0
  764.             end if
  765.           end if
  766.           if gRightTowerList[5] = 20 then
  767.             sprite(20).loc = point(476, 280)
  768.           end if
  769.           if gRightTowerList[5] = 19 then
  770.             sprite(19).loc = point(476, 280)
  771.           end if
  772.           if gRightTowerList[5] = 18 then
  773.             sprite(18).loc = point(476, 280)
  774.           end if
  775.           if gRightTowerList[5] = 17 then
  776.             sprite(17).loc = point(476, 280)
  777.           end if
  778.           if gRightTowerList[5] = 16 then
  779.             sprite(16).loc = point(476, 280)
  780.           end if
  781.           if gRightTowerList[5] = 15 then
  782.             sprite(15).loc = point(476, 280)
  783.           end if
  784.           if gRightTowerList[5] = 14 then
  785.             sprite(14).loc = point(476, 280)
  786.           end if
  787.         end if
  788.         if gRightTowerList[6] <> 0 then
  789.           gPlaced = 1
  790.           if gStackSide <> 6 then
  791.             if gMoveFix = 1 then
  792.               gMoves = gMoves + 1
  793.               member("MovesText").text = string(gMoves)
  794.               gMoveFix = 0
  795.             end if
  796.           end if
  797.           if gRightTowerList[6] = 20 then
  798.             sprite(20).loc = point(476, 262)
  799.           end if
  800.           if gRightTowerList[6] = 19 then
  801.             sprite(19).loc = point(476, 262)
  802.           end if
  803.           if gRightTowerList[6] = 18 then
  804.             sprite(18).loc = point(476, 262)
  805.           end if
  806.           if gRightTowerList[6] = 17 then
  807.             sprite(17).loc = point(476, 262)
  808.           end if
  809.           if gRightTowerList[6] = 16 then
  810.             sprite(16).loc = point(476, 262)
  811.           end if
  812.           if gRightTowerList[6] = 15 then
  813.             sprite(15).loc = point(476, 262)
  814.           end if
  815.           if gRightTowerList[6] = 14 then
  816.             sprite(14).loc = point(476, 262)
  817.           end if
  818.         end if
  819.         if gRightTowerList[7] <> 0 then
  820.           gPlaced = 1
  821.           if gStackSide <> 4 then
  822.             if gMoveFix = 1 then
  823.               gMoves = gMoves + 1
  824.               member("MovesText").text = string(gMoves)
  825.               gMoveFix = 0
  826.             end if
  827.           end if
  828.           if gRightTowerList[7] = 20 then
  829.             sprite(20).loc = point(476, 244)
  830.           end if
  831.           if gRightTowerList[7] = 19 then
  832.             sprite(19).loc = point(476, 244)
  833.           end if
  834.           if gRightTowerList[7] = 18 then
  835.             sprite(18).loc = point(476, 244)
  836.           end if
  837.           if gRightTowerList[7] = 17 then
  838.             sprite(17).loc = point(476, 244)
  839.           end if
  840.           if gRightTowerList[7] = 16 then
  841.             sprite(16).loc = point(476, 244)
  842.           end if
  843.           if gRightTowerList[7] = 15 then
  844.             sprite(15).loc = point(476, 244)
  845.           end if
  846.           if gRightTowerList[7] = 14 then
  847.             sprite(14).loc = point(476, 244)
  848.           end if
  849.         end if
  850.       else
  851.         sprite(gDiscNum).locH = gOriginX
  852.         sprite(gDiscNum).locV = gOriginY
  853.         gPlaced = 0
  854.         if gStackSide = 4 then
  855.           gPosX = 100
  856.           gPosY = 150
  857.           stack()
  858.         else
  859.           if gStackSide = 5 then
  860.             gPosX = 250
  861.             gPosY = 150
  862.             stack()
  863.           else
  864.             if gStackSide = 6 then
  865.               gPosX = 400
  866.               gPosY = 150
  867.               stack()
  868.             end if
  869.           end if
  870.         end if
  871.       end if
  872.     end if
  873.   end if
  874. end
  875.  
  876. on CheckLeftStackOrder
  877.   repeat with gCheckList = 1 to 10
  878.     if gLeftTowerList[gCheckList] = 0 then
  879.       if gCheckList = 1 then
  880.         gSingle = 1
  881.       else
  882.         gSingle = 0
  883.       end if
  884.       if gLeftTowerList[gCheckList - (1 - gSingle)] < gDiscNum then
  885.         gLeftTowerList[gCheckList] = gDiscNum
  886.         exit
  887.         next repeat
  888.       end if
  889.       sprite(gDiscNum).locH = gOriginX
  890.       sprite(gDiscNum).locV = gOriginY
  891.       gPlaced = 0
  892.       gMoves = gMoves - 1
  893.       if gStackSide = 4 then
  894.         gPosX = 100
  895.         gPosY = 150
  896.         stack()
  897.       else
  898.         if gStackSide = 5 then
  899.           gPosX = 250
  900.           gPosY = 150
  901.           stack()
  902.         else
  903.           if gStackSide = 6 then
  904.             gPosX = 400
  905.             gPosY = 150
  906.             stack()
  907.           end if
  908.         end if
  909.       end if
  910.       exit
  911.     end if
  912.   end repeat
  913. end
  914.  
  915. on CheckCenterStackOrder
  916.   repeat with gCheckList = 1 to 10
  917.     if gCenterTowerList[gCheckList] = 0 then
  918.       if gCheckList = 1 then
  919.         gSingle = 1
  920.       else
  921.         gSingle = 0
  922.       end if
  923.       if gCenterTowerList[gCheckList - (1 - gSingle)] < gDiscNum then
  924.         gCenterTowerList[gCheckList] = gDiscNum
  925.         exit
  926.         next repeat
  927.       end if
  928.       sprite(gDiscNum).locH = gOriginX
  929.       sprite(gDiscNum).locV = gOriginY
  930.       gPlaced = 0
  931.       gMoves = gMoves - 1
  932.       if gStackSide = 4 then
  933.         gPosX = 100
  934.         gPosY = 150
  935.         stack()
  936.       else
  937.         if gStackSide = 5 then
  938.           gPosX = 250
  939.           gPosY = 150
  940.           stack()
  941.         else
  942.           if gStackSide = 6 then
  943.             gPosX = 400
  944.             gPosY = 150
  945.             stack()
  946.           end if
  947.         end if
  948.       end if
  949.       exit
  950.     end if
  951.   end repeat
  952. end
  953.  
  954. on CheckRightStackOrder
  955.   repeat with gCheckList = 1 to 10
  956.     if gRightTowerList[gCheckList] = 0 then
  957.       if gCheckList = 1 then
  958.         gSingle = 1
  959.       else
  960.         gSingle = 0
  961.       end if
  962.       if gRightTowerList[gCheckList - (1 - gSingle)] < gDiscNum then
  963.         gRightTowerList[gCheckList] = gDiscNum
  964.         exit
  965.         next repeat
  966.       end if
  967.       sprite(gDiscNum).locH = gOriginX
  968.       sprite(gDiscNum).locV = gOriginY
  969.       gPlaced = 0
  970.       gMoves = gMoves - 1
  971.       if gStackSide = 4 then
  972.         gPosX = 100
  973.         gPosY = 150
  974.         stack()
  975.       else
  976.         if gStackSide = 5 then
  977.           gPosX = 250
  978.           gPosY = 150
  979.           stack()
  980.         else
  981.           if gStackSide = 6 then
  982.             gPosX = 400
  983.             gPosY = 150
  984.             stack()
  985.           end if
  986.         end if
  987.       end if
  988.       exit
  989.     end if
  990.   end repeat
  991. end
  992.