﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.98.6484.11448"?>
<regions xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings>
    <identity>
      <id>f9f90b24-eae0-4430-b80d-721c55f893c8</id>
      <revision>153</revision>
    </identity>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="1" orientation="Portrait" width="850" height="1100" />
      <margins left="39" right="39" top="39" bottom="39" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="0.98.6484.11448" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Math Region" version="0.98.6484.11448" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="Special Functions" version="1.11.6484.11450" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="Text Region" version="1.10.6484.11451" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
      <assembly name="Hyperlink Region" version="1.0.6362.5973" guid="4938d1a8-ad11-4de8-afbf-d76d069cfbf8" />
      <assembly name="Table Region" version="0.2.6492.29469" guid="51fec712-ec75-4551-a13e-478d375ae8d6" />
    </dependencies>
    <mode debug="true" />
  </settings>
  <region id="0" top="18" color="#000000" bgColor="#ffffff">
    <area collapsed="true">
      <title lang="eng">
        <p>MANCALA GAME By OSCAR CAMPO</p>
      </title>
    </area>
    <region id="1" left="81" top="54" width="662" height="389" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">sds</e>
          <e type="operand">ply</e>
          <e type="function" args="2">mancalaini</e>
          <e type="operand">ply</e>
          <e type="function" args="1">strtoupper</e>
          <e type="operand" style="string">C</e>
          <e type="function" args="2">findstr</e>
          <e type="function" args="1">mat2sys</e>
          <e type="operand">0</e>
          <e type="operator" args="2">&lt;</e>
          <e type="operand">ply1</e>
          <e type="operand" style="string">Player1-&gt;</e>
          <e type="operator" args="2">:</e>
          <e type="operand">ply2</e>
          <e type="operand" style="string">&lt;-Player2</e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj</e>
          <e type="operand" style="string">Turn: Player </e>
          <e type="operand">2</e>
          <e type="function" args="1">random</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="function" args="1">var2str</e>
          <e type="function" args="2">concat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operand">ply1</e>
          <e type="operand" style="string">You-&gt;</e>
          <e type="operator" args="2">:</e>
          <e type="operand">ply2</e>
          <e type="operand" style="string">&lt;-SMath</e>
          <e type="operator" args="2">:</e>
          <e type="operand">WhoBegins</e>
          <e type="operand" style="string">ply</e>
          <e type="operand">2</e>
          <e type="function" args="1">random</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="function" args="1">var2str</e>
          <e type="function" args="2">concat</e>
          <e type="function" args="1">str2num</e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj</e>
          <e type="operand">WhoBegins</e>
          <e type="operand" style="string"> Begins</e>
          <e type="function" args="2">concat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">4</e>
          <e type="operand">1</e>
          <e type="function" args="6">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">p1</e>
          <e type="operand">ply1</e>
          <e type="operand">sds</e>
          <e type="operand">1</e>
          <e type="operand">6</e>
          <e type="function" args="2">Ones</e>
          <e type="operator" args="2">*</e>
          <e type="operand">0</e>
          <e type="function" args="3">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p2</e>
          <e type="operand">0</e>
          <e type="operand">sds</e>
          <e type="operand">1</e>
          <e type="operand">6</e>
          <e type="function" args="2">Ones</e>
          <e type="operator" args="2">*</e>
          <e type="operand">ply2</e>
          <e type="function" args="3">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">store1</e>
          <e type="operand">p1</e>
          <e type="operand">8</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">store2</e>
          <e type="operand">p2</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">p2</e>
          <e type="operand">p1</e>
          <e type="function" args="2">stack</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand">mancala</e>
          <e type="function" args="2">wfile</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand">8</e>
          <e type="operand">1</e>
          <e type="function" args="10">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="2" left="792" top="63" width="530" height="440" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">pi</e>
          <e type="operand">pj</e>
          <e type="function" args="2">bestmove</e>
          <e type="operand">best</e>
          <e type="operand">1</e>
          <e type="operand">6</e>
          <e type="function" args="2">range</e>
          <e type="operand">6</e>
          <e type="function" args="1">Zeros</e>
          <e type="function" args="2">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p1</e>
          <e type="operand">pi</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p2</e>
          <e type="operand">pj</e>
          <e type="operator" args="2">:</e>
          <e type="operand">i</e>
          <e type="operand">1</e>
          <e type="operand">6</e>
          <e type="function" args="2">range</e>
          <e type="operand">m</e>
          <e type="operand">p1</e>
          <e type="operand">i</e>
          <e type="operand">p2</e>
          <e type="function" args="3">move</e>
          <e type="operator" args="2">:</e>
          <e type="operand">m</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string">Play Again!</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">best</e>
          <e type="operand">i</e>
          <e type="operand">2</e>
          <e type="function" args="3">el</e>
          <e type="operand">10000</e>
          <e type="operator" args="2">:</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operand">m</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string">Capture! Turn: You-&gt;</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">qq</e>
          <e type="operand">m</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">best</e>
          <e type="operand">i</e>
          <e type="operand">2</e>
          <e type="function" args="3">el</e>
          <e type="operand">5</e>
          <e type="operand">qq</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">el</e>
          <e type="operand">pi</e>
          <e type="operand">8</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">:</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="operand">m</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string">Illegal Movement!Turn: You-&gt;</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">best</e>
          <e type="operand">i</e>
          <e type="operand">2</e>
          <e type="function" args="3">el</e>
          <e type="operand">1</e>
          <e type="operator" args="1">-</e>
          <e type="operator" args="2">:</e>
          <e type="operand">best</e>
          <e type="operand">i</e>
          <e type="operand">2</e>
          <e type="function" args="3">el</e>
          <e type="operand">0</e>
          <e type="operator" args="2">:</e>
          <e type="function" args="3">if</e>
          <e type="function" args="3">if</e>
          <e type="function" args="3">if</e>
          <e type="operand">p1</e>
          <e type="operand">pi</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p2</e>
          <e type="operand">pj</e>
          <e type="operator" args="2">:</e>
          <e type="operand">4</e>
          <e type="operand">1</e>
          <e type="function" args="6">line</e>
          <e type="function" args="3">for</e>
          <e type="operand">best</e>
          <e type="operand">best</e>
          <e type="operand">2</e>
          <e type="function" args="2">csort</e>
          <e type="operator" args="2">:</e>
          <e type="operand">best</e>
          <e type="operand">6</e>
          <e type="operand">1</e>
          <e type="function" args="3">el</e>
          <e type="operand">6</e>
          <e type="operand">1</e>
          <e type="function" args="8">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="3" left="639" top="504" width="244" height="83" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">t</e>
          <e type="function" args="1">wait</e>
          <e type="operand">t0</e>
          <e type="operand">1</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
          <e type="operand">1</e>
          <e type="function" args="1">time</e>
          <e type="operand">t0</e>
          <e type="operator" args="2">-</e>
          <e type="operand">t</e>
          <e type="operator" args="2">&lt;</e>
          <e type="operand">0</e>
          <e type="function" args="2">while</e>
          <e type="operand">1</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="4" left="54" top="549" width="447" height="899" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">p#</e>
          <e type="operand">pot</e>
          <e type="function" args="2">mancala</e>
          <e type="operand">p#</e>
          <e type="function" args="1">IsString</e>
          <e type="operand">m</e>
          <e type="operand">pot</e>
          <e type="operand">p#</e>
          <e type="function" args="2">mancalaini</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">m</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj</e>
          <e type="operand">m</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand">mancala</e>
          <e type="function" args="2">wfile</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand">5</e>
          <e type="operand">1</e>
          <e type="function" args="7">line</e>
          <e type="operand">p#</e>
          <e type="operand">0</e>
          <e type="operator" args="2">≡</e>
          <e type="operand" style="string">undo</e>
          <e type="operand">k</e>
          <e type="operand">mancala</e>
          <e type="function" args="1">rfile</e>
          <e type="operator" args="2">:</e>
          <e type="operand">k</e>
          <e type="operand">k</e>
          <e type="operand">1</e>
          <e type="operand">k</e>
          <e type="function" args="1">rows</e>
          <e type="operand">2</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="function" args="2">range</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">k</e>
          <e type="operand">mancala</e>
          <e type="function" args="2">wfile</e>
          <e type="operand">k</e>
          <e type="operand">k</e>
          <e type="function" args="1">rows</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="bracket">(</e>
          <e type="operand">k</e>
          <e type="function" args="1">rows</e>
          <e type="bracket">(</e>
          <e type="function" args="2">range</e>
          <e type="function" args="2">el</e>
          <e type="operand">5</e>
          <e type="operand">1</e>
          <e type="function" args="7">line</e>
          <e type="operand">k</e>
          <e type="operand">mancala</e>
          <e type="function" args="1">rfile</e>
          <e type="operator" args="2">:</e>
          <e type="operand">k</e>
          <e type="function" args="1">rows</e>
          <e type="operand">2</e>
          <e type="operator" args="2">&gt;</e>
          <e type="operand">pl</e>
          <e type="operand">k</e>
          <e type="operand">k</e>
          <e type="function" args="1">rows</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p1</e>
          <e type="operand">pl</e>
          <e type="operand">2</e>
          <e type="function" args="2">row</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p2</e>
          <e type="operand">pl</e>
          <e type="operand">1</e>
          <e type="function" args="2">row</e>
          <e type="operator" args="2">:</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operand">p1</e>
          <e type="operand">k</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">2</e>
          <e type="function" args="2">row</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p2</e>
          <e type="operand">k</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="function" args="2">row</e>
          <e type="operator" args="2">:</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">p2</e>
          <e type="operand">p2</e>
          <e type="operand">1</e>
          <e type="operand">8</e>
          <e type="operand">1</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p#</e>
          <e type="operand">1</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">m</e>
          <e type="operand">p1</e>
          <e type="operand">pot</e>
          <e type="operand">p2</e>
          <e type="function" args="3">move</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">m</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj</e>
          <e type="operand">m</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operand">p2</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string">&lt;-SMath</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">bst</e>
          <e type="operand">p2</e>
          <e type="operand">p1</e>
          <e type="function" args="2">bestmove</e>
          <e type="operator" args="2">:</e>
          <e type="operand">m</e>
          <e type="operand">p2</e>
          <e type="operand">bst</e>
          <e type="operand">p1</e>
          <e type="function" args="3">move</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">m</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj</e>
          <e type="operand">m</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">4</e>
          <e type="operand">1</e>
          <e type="function" args="6">line</e>
          <e type="operand" style="string" />
          <e type="function" args="3">if</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">k</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="function" args="2">stack</e>
          <e type="operand">mancala</e>
          <e type="function" args="2">wfile</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand">6</e>
          <e type="operand">1</e>
          <e type="function" args="8">line</e>
          <e type="function" args="3">if</e>
          <e type="function" args="3">if</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="5" left="45" top="1467" width="529" height="1110" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">pi</e>
          <e type="operand">pot</e>
          <e type="operand">pj</e>
          <e type="function" args="3">move</e>
          <e type="operand">pot</e>
          <e type="operand">7</e>
          <e type="operator" args="2">≡</e>
          <e type="operand">msj</e>
          <e type="operand" style="string">Illegal Movement!</e>
          <e type="operator" args="2">:</e>
          <e type="operand">ply</e>
          <e type="operand">pi</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">pj</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">pi</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="operand">8</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="operand">pj</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="operand">8</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="function" args="2">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operand">i</e>
          <e type="operand">pot</e>
          <e type="operator" args="2">:</e>
          <e type="operand">pini</e>
          <e type="operand">pi</e>
          <e type="operand">i</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p0</e>
          <e type="operand">pini</e>
          <e type="operator" args="2">:</e>
          <e type="operand">pi</e>
          <e type="operand">i</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="function" args="2">el</e>
          <e type="operand">0</e>
          <e type="operator" args="2">:</e>
          <e type="operand">ply</e>
          <e type="operand">pi</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">pj</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">pi</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="operand">8</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="operand">pj</e>
          <e type="operand">1</e>
          <e type="operand">2</e>
          <e type="operand">8</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="function" args="2">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">pini</e>
          <e type="operand">0</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operand">msj1</e>
          <e type="operand" style="string">Illegal Movement!</e>
          <e type="operator" args="2">:</e>
          <e type="operand">O</e>
          <e type="operand">pi</e>
          <e type="operand">pj</e>
          <e type="operand">ply</e>
          <e type="function" args="3">organize</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">O</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p#</e>
          <e type="operand">O</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">4</e>
          <e type="operand">1</e>
          <e type="function" args="6">line</e>
          <e type="operand">pini</e>
          <e type="operand">0</e>
          <e type="operator" args="2">&gt;</e>
          <e type="operand">msj1</e>
          <e type="operand" style="string" />
          <e type="operator" args="2">:</e>
          <e type="operand">i</e>
          <e type="operand">12</e>
          <e type="operator" args="2">&gt;</e>
          <e type="operand">i</e>
          <e type="operand">i</e>
          <e type="operand">12</e>
          <e type="operator" args="2">-</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="operand">i</e>
          <e type="operand">i</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">pini</e>
          <e type="operand">pini</e>
          <e type="operand">1</e>
          <e type="operator" args="2">-</e>
          <e type="operator" args="2">:</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="function" args="2">while</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">p</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">6</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="function" args="1">sum</e>
          <e type="bracket">(</e>
          <e type="operand">0</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operand">p</e>
          <e type="operand">1</e>
          <e type="operand">8</e>
          <e type="operand">13</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="function" args="1">sum</e>
          <e type="bracket">(</e>
          <e type="operand">0</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">|</e>
          <e type="operand">p</e>
          <e type="operand">7</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">14</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">&gt;</e>
          <e type="operand">msj</e>
          <e type="operand">ply</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string"> Wins!!</e>
          <e type="function" args="2">concat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operand">msj</e>
          <e type="operand">ply</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string"> Win!!</e>
          <e type="function" args="2">concat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">i</e>
          <e type="operand">7</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operand">pot</e>
          <e type="operand">7</e>
          <e type="operator" args="2">≠</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">&amp;</e>
          <e type="operand">msj</e>
          <e type="operand" style="string">Play Again!</e>
          <e type="operator" args="2">:</e>
          <e type="operand">i</e>
          <e type="operand">7</e>
          <e type="operator" args="2">&lt;</e>
          <e type="bracket">(</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operand">p</e>
          <e type="operand">14</e>
          <e type="operand">i</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="2">el</e>
          <e type="operand">0</e>
          <e type="operator" args="2">&gt;</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">&amp;</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">&amp;</e>
          <e type="operand">p</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">capture</e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj1</e>
          <e type="operand" style="string">Capture! </e>
          <e type="operator" args="2">:</e>
          <e type="operand">msj</e>
          <e type="operand">msj1</e>
          <e type="operand" style="string">Turn: </e>
          <e type="operand">ply</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="function" args="3">concat</e>
          <e type="operator" args="2">:</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operand">msj</e>
          <e type="operand">msj1</e>
          <e type="operand" style="string">Turn: </e>
          <e type="operand">ply</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="function" args="3">concat</e>
          <e type="operator" args="2">:</e>
          <e type="function" args="3">if</e>
          <e type="function" args="3">if</e>
          <e type="function" args="3">if</e>
          <e type="operand" style="string" />
          <e type="operand">9</e>
          <e type="operand">1</e>
          <e type="function" args="11">line</e>
          <e type="function" args="3">if</e>
          <e type="operand" style="string" />
          <e type="operand">pi</e>
          <e type="operand">pi</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="operand">7</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="function" args="2">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">pj</e>
          <e type="operand">pj</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">1</e>
          <e type="operand">8</e>
          <e type="operand">14</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="function" args="2">augment</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">pi</e>
          <e type="operand">pj</e>
          <e type="operand">ply</e>
          <e type="function" args="3">organize</e>
          <e type="operator" args="2">:</e>
          <e type="operand">M</e>
          <e type="operand">msj</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">mat</e>
          <e type="operand">6</e>
          <e type="operand">1</e>
          <e type="function" args="8">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="6" left="783" top="1692" width="512" height="129" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">pi</e>
          <e type="operand">pj</e>
          <e type="operand">ply</e>
          <e type="function" args="3">organize</e>
          <e type="operand">ply</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string">Player1-&gt;</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operand">ply</e>
          <e type="operand">1</e>
          <e type="function" args="2">el</e>
          <e type="operand" style="string">You-&gt;</e>
          <e type="operator" args="2">≡</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">|</e>
          <e type="operand">M</e>
          <e type="operand">pj</e>
          <e type="operand">1</e>
          <e type="operand">8</e>
          <e type="operand">1</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="operand">pi</e>
          <e type="function" args="2">stack</e>
          <e type="operator" args="2">:</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operand">M</e>
          <e type="operand">pi</e>
          <e type="operand">1</e>
          <e type="operand">8</e>
          <e type="operand">1</e>
          <e type="function" args="2">range</e>
          <e type="function" args="3">el</e>
          <e type="operand">pj</e>
          <e type="function" args="2">stack</e>
          <e type="operator" args="2">:</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="function" args="3">if</e>
          <e type="operand">M</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="7" left="90" top="2700" width="298" height="105" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">capture</e>
          <e type="operand">p</e>
          <e type="operand">7</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">7</e>
          <e type="function" args="2">el</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">+</e>
          <e type="operand">p</e>
          <e type="operand">14</e>
          <e type="operand">i</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">i</e>
          <e type="function" args="2">el</e>
          <e type="operand">0</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">14</e>
          <e type="operand">i</e>
          <e type="operator" args="2">-</e>
          <e type="function" args="2">el</e>
          <e type="operand">0</e>
          <e type="operator" args="2">:</e>
          <e type="operand">p</e>
          <e type="operand">4</e>
          <e type="operand">1</e>
          <e type="function" args="6">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="8" left="81" top="2844" width="196" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">history</e>
          <e type="operand">mancala</e>
          <e type="function" args="1">rfile</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="9" top="2889" color="#000000" bgColor="#ffffff">
      <area terminator="true" />
    </region>
  </region>
  <region id="10" top="2916" color="#000000" bgColor="#ffffff">
    <area collapsed="true">
      <title lang="eng">
        <p>UPDATES</p>
      </title>
    </area>
    <region id="11" left="36" top="2952" width="463" height="72" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>*** Updates on oct/18/2017:- minor bug fixes- computer algorithm updated for a more agressive game!</p>
      </text>
    </region>
    <region id="12" left="36" top="3033" width="686" height="200" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>*** Updates on oct/12/2017: UNDO function, HISTORY function, colored board, computer algorithm updated for a more agressive game!              UNDO              If  argument #1 on mancala(#1,#2) is 0 (zero) you go one step backwards              in the game              REVIEW YOUR GAME              Typping "history" (without quotation marks) as input of the table, you can              review all your game. You can also type "history="  in any empty area of the              worksheet (without quotation marks).</p>
      </text>
    </region>
    <region id="13" top="3330" color="#000000" bgColor="#ffffff">
      <area terminator="true" />
    </region>
  </region>
  <region id="14" top="3366" color="#000000" bgColor="#ffffff">
    <area collapsed="true">
      <title lang="eng">
        <p>INSTRUCTIONS</p>
      </title>
    </area>
    <region id="15" left="36" top="3402" width="678" height="520" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>Instructions of this Game on SMath: mancala(#1,#2): main function. For play you only need to change its arguments.   For a New Game:	#1 = "hh" for a "human vs human" Game	#1 = "hc" for a "human vs computer" Game	#2 = number of seeds on each hole of the board	example: mancala("hc",4) initializes a mancala board with 4 seed on each              hole, for a human vs computer game Playing:	"HUMAN vs HUMAN" game.	First turn is random. For a play, the player uses the mancala(#1,#2)              function as follows:	#1: his/her player number (i.e. 1 or 2)	#2: the number of the hole to play		"HUMAN vs SMATH" Game.	First turn is random. 	The human player ever is the "Player 1" For a play, the human player uses              the mancala(#1,#2) function in the same way as human vs human Game, so              his/her movements will be mancala(1,x), where x is the number of the hole              to play. Smath can't play automatically  so, please help it. When Smath              have the turn to play, please, change the #1 argument of mancala() function             to 2, second argument is not necessary. Example: mancala(2, #2) let SMath              make its movement. Argument #2 can be any number.                           		The algorithm for computer strategy is very simple. It only evaluates the               best movement for each play.		Please try it and comment bugs or improvements.		Have fun!      </p>
      </text>
    </region>
    <region id="16" top="3924" color="#000000" bgColor="#ffffff">
      <area terminator="true" />
    </region>
  </region>
  <region id="17" left="135" top="3987" width="28" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <hyperlink dl="https://www.instructables.com/id/How-to-play-MANCALA/" flags="" sd="False" width="18" height="18">
      <description active="false" position="Right" lang="eng">
        <p />
      </description>
      <input>
        <e type="operand" style="string">https://www.instructables.com/id/How-to-play-MANCALA/</e>
      </input>
    </hyperlink>
  </region>
  <region id="18" left="54" top="4086" width="604" height="122" color="#000000" bgColor="#ffffff" fontSize="10">
    <table id="1" elementsOnDataSizeChange="10,10" focus="0,0;0,1" bgColor="White" borderSize="10,10" borderStyle="Solid,Solid" borderColor="#804000,Black" frameBorderSize="10,10,10,10" frameBorderStyle="Solid,Solid,Solid,Solid" frameBorderColor="#804000,#804000,#804000,#804000" resizeFrame="5px #0080FF" resizeFrameInner="#000000 alpha:0" resizeFrameOuter="#0A0A0A alpha:130">
      <inputs>
        <e regions="columns">capture</e>
        <e regions="columns">organize</e>
        <e regions="columns">move</e>
        <e regions="columns">mancala</e>
        <e regions="columns">wait</e>
        <e regions="columns">bestmove</e>
        <e regions="columns">mancalaini</e>
        <e regions="rows">history</e>
        <e regions="rows">capture</e>
        <e regions="rows">organize</e>
        <e regions="rows">move</e>
        <e regions="rows">mancala</e>
        <e regions="rows">wait</e>
        <e regions="rows">bestmove</e>
        <e regions="rows">mancalaini</e>
      </inputs>
      <regions header="False" lstub="False" units="False,Top" rstub="False" footer="False" footnote="False" caption="False,Bottom">
        <body rows="2" cols="1" align="Center" pattern="Fixed,Fixed" borderSize="2,2" borderStyle="Solid,Solid" borderColor="#804000,#804000" padding="3,3" color="Black,Black" bgColor="#FFB162,White" style="Rows" styleEffects="None" font="Microsoft Sans Serif, 10pt" numbers="Default,2,2,False,0,False,6" highlighters="#0080FF,White,#804000,Black" ellipsisFont="Microsoft Sans Serif, 12pt, style=Bold" ellipsisSize="0">
          <tr>
            <td>mat(0,6,6,6,6,6,6,"&lt;-SMath","You-&gt;",6,6,6,6,6,6,0,2,8)</td>
          </tr>
          <tr>
            <td>You-&gt; Begins</td>
          </tr>
        </body>
        <units input="" rows="1" cols="1" align="Center" pattern="Fixed,Fixed" borderSize="2,2" borderStyle="Dot,Dot" borderColor="Black,Black" padding="3,3" color="Black,Black" bgColor="White,White" style="Uniform" styleEffects="None" font="Microsoft Sans Serif, 10pt" numbers="Default,2,0,False,0,False,6" highlighters="#0080FF,White,#E1E1E1,Black" ellipsisFont="Microsoft Sans Serif, 12pt, style=Bold" ellipsisSize="0">
          <tr>
            <td>#</td>
          </tr>
        </units>
        <header input="" rows="1" cols="1" align="Center" pattern="Fixed,Fixed" borderSize="1,2" borderStyle="Dot,Dot" borderColor="Black,Black" padding="3,3" color="Black,Black" bgColor="White,White" style="Uniform" styleEffects="None" font="Microsoft Sans Serif, 10pt" numbers="Default,2,0,False,0,False,6" highlighters="#0080FF,White,#E1E1E1,Black" ellipsisFont="Microsoft Sans Serif, 12pt, style=Bold" ellipsisSize="0">
          <tr>
            <td>#</td>
          </tr>
        </header>
        <lstub input="" rows="1" cols="1" align="Center" pattern="Fixed,Fixed" borderSize="2,1" borderStyle="Dot,Dot" borderColor="Black,Black" padding="3,3" color="Black,Black" bgColor="White,White" style="Uniform" styleEffects="None" font="Microsoft Sans Serif, 10pt" numbers="Default,2,0,False,0,False,6" highlighters="#0080FF,White,#E1E1E1,Black" ellipsisFont="Microsoft Sans Serif, 12pt, style=Bold" ellipsisSize="0">
          <tr>
            <td>#</td>
          </tr>
        </lstub>
        <rstub input="" rows="1" cols="1" align="Center" pattern="Fixed,Fixed" borderSize="2,1" borderStyle="Dot,Dot" borderColor="Black,Black" padding="3,3" color="Black,Black" bgColor="White,White" style="Uniform" styleEffects="None" font="Microsoft Sans Serif, 10pt" numbers="Default,2,0,False,0,False,6" highlighters="#0080FF,White,#E1E1E1,Black" ellipsisFont="Microsoft Sans Serif, 12pt, style=Bold" ellipsisSize="0">
          <tr>
            <td>#</td>
          </tr>
        </rstub>
        <footer input="" rows="1" cols="1" align="Center" pattern="Fixed,Fixed" borderSize="1,2" borderStyle="Dot,Dot" borderColor="Black,Black" padding="3,3" color="Black,Black" bgColor="White,White" style="Uniform" styleEffects="None" font="Microsoft Sans Serif, 10pt" numbers="Default,2,0,False,0,False,6" highlighters="#0080FF,White,#E1E1E1,Black" ellipsisFont="Microsoft Sans Serif, 12pt, style=Bold" ellipsisSize="0">
          <tr>
            <td>#</td>
          </tr>
        </footer>
        <footnote align="Near" borderSize="1" borderStyle="Solid" borderColor="Black" padding="3,3" color="Black" bgColor="White" font="Microsoft Sans Serif, 7.5pt" text="NOTE" />
        <caption align="Near" borderSize="1" borderStyle="Solid" borderColor="Black" padding="3,3" color="Black" bgColor="White" font="Microsoft Sans Serif, 10pt" text="Table %T" />
      </regions>
      <input>
        <e type="operand" style="string">hc</e>
        <e type="operand">6</e>
        <e type="function" args="2">mancala</e>
      </input>
    </table>
  </region>
</regions>