<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: State</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: State</h1>

    




<section>

<header>
    
        <h2>State</h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="State"><span class="type-signature"></span>new State<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    State contains points and pieces and very basic methods to move pieces
around without enforcing any rules. Those methods are responsible for
required changes to internal state only, the UI layer should handle
graphical movement of pieces itself.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line299">line 299</a>
    </li></ul></dd>
    

    

    

    
</dl>
















    
    </div>

    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="bar"><span class="type-signature"></span>bar<span class="type-signature"> :Array.&lt;Array></span></h4>




<div class="description">
    Players have separate bar places and so separate list.
First element of array is for white pieces and second one for black.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Array.&lt;Array></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line318">line 318</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="nextPieceID"><span class="type-signature"></span>nextPieceID<span class="type-signature"> :number</span></h4>




<div class="description">
    Counter for generating unique IDs for pieces within this state
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">number</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line343">line 343</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="outside"><span class="type-signature"></span>outside<span class="type-signature"> :Array.&lt;Array></span></h4>




<div class="description">
    Players have separate outside places and so separate list.
First element of array is for white pieces and second one for black.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Array.&lt;Array></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line327">line 327</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="pieces"><span class="type-signature"></span>pieces<span class="type-signature"></span></h4>




<div class="description">
    A two dimensional array is also used to store references to all white and
black pieces independent of their position - just for convenience.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line335">line 335</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="points"><span class="type-signature"></span>points<span class="type-signature"> :Array</span></h4>




<div class="description">
    All popular variants of the game have a total of 24 positions on the board
and two positions outside - the place on the bar where pieces go when
hit and the place next to board where pieces go when beared off.
Number of positions is not strictly defined here to allow more options
when creating new rules.
The points, bar, outside and pieces properties should be initialized by the
Rule object. Each element in those properties should contain a stack
(last in, first out).
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Array</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line311">line 311</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".checkTopPieceType"><span class="type-signature">(static) </span>checkTopPieceType<span class="signature">(state, position, type)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Get top piece, checking type in the process
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">Denormalized point position</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#PieceType">PieceType</a></span>


            
            </td>

            

            

            <td class="description last">Piece type</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line415">line 415</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Returns true if top piece at position is of the specified type. Returns false if there are no pieces at that point.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".clear"><span class="type-signature">(static) </span>clear<span class="signature">(state)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Clear state
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line350">line 350</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".clone"><span class="type-signature">(static) </span>clone<span class="signature">(state)</span><span class="type-signature"> &rarr; {<a href="State.html">State</a>}</span></h4>

    



<div class="description">
    Creates a deep copy of state object
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Game state</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line536">line 536</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - New state object
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="State.html">State</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".countAllAtPos"><span class="type-signature">(static) </span>countAllAtPos<span class="signature">(state, position)</span><span class="type-signature"> &rarr; {number}</span></h4>

    



<div class="description">
    Count number of all pieces at selected position, regardless of type
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">Denormalized point position</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line388">line 388</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Number of pieces of specified type
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".countAtPos"><span class="type-signature">(static) </span>countAtPos<span class="signature">(state, position, type)</span><span class="type-signature"> &rarr; {number}</span></h4>

    



<div class="description">
    Count number of pieces of specified type at selected position
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">Denormalized point position</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#PieceType">PieceType</a></span>


            
            </td>

            

            

            <td class="description last">Piece type</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line370">line 370</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Number of pieces of specified type
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getBarTopPiece"><span class="type-signature">(static) </span>getBarTopPiece<span class="signature">(state, type)</span><span class="type-signature"> &rarr; {<a href="Piece.html">Piece</a>}</span></h4>

    



<div class="description">
    Get top piece at bar
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#PieceType">PieceType</a></span>


            
            </td>

            

            

            <td class="description last">Type of piece (white/black)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line505">line 505</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Returns type of top piece or null if there are no pieces at that position
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Piece.html">Piece</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getPiecePos"><span class="type-signature">(static) </span>getPiecePos<span class="signature">(state, piece)</span><span class="type-signature"> &rarr; {number}</span></h4>

    



<div class="description">
    Get position of piece on board. Return null if the piece is on bar or outside the board.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Game</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>piece</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Piece.html">Piece</a></span>


            
            </td>

            

            

            <td class="description last">Piece</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line519">line 519</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Position of piece on board or null if on bar/outside the board
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getTopPiece"><span class="type-signature">(static) </span>getTopPiece<span class="signature">(state, position)</span><span class="type-signature"> &rarr; {<a href="Piece.html">Piece</a>}</span></h4>

    



<div class="description">
    Get top piece at specified position
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">Denormalized point position</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line433">line 433</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Returns type of top piece or null if there are no pieces at that position
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Piece.html">Piece</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getTopPieceType"><span class="type-signature">(static) </span>getTopPieceType<span class="signature">(state, position)</span><span class="type-signature"> &rarr; {<a href="global.html#PieceType">PieceType</a>}</span></h4>

    



<div class="description">
    Get type of top piece at specified position
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">Denormalized point position</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line448">line 448</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Returns type of top piece or null if there are no pieces at that position
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#PieceType">PieceType</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".havePiecesOnBar"><span class="type-signature">(static) </span>havePiecesOnBar<span class="signature">(state, type)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Check if there are any pieces on the bar.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">State to check</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#PieceType">PieceType</a></span>


            
            </td>

            

            

            <td class="description last">Type of piece (white/black)</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line463">line 463</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - True if there are any pieces on the bar
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".isPieceOnBar"><span class="type-signature">(static) </span>isPieceOnBar<span class="signature">(state, piece)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Check if a specific piece is on the bar.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">State to check</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>piece</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Piece.html">Piece</a></span>


            
            </td>

            

            

            <td class="description last">Piece</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line473">line 473</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - True if there are any pieces on the bar
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".isPieceOutside"><span class="type-signature">(static) </span>isPieceOutside<span class="signature">(state, piece)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Check if the piece is outside.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">State to check</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>piece</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Piece.html">Piece</a></span>


            
            </td>

            

            

            <td class="description last">Piece</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line489">line 489</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - True if there are any pieces on the bar
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".isPosFree"><span class="type-signature">(static) </span>isPosFree<span class="signature">(state, position)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Check if there are no pieces at the specified point
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>state</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="State.html">State</a></span>


            
            </td>

            

            

            <td class="description last">Board state</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>position</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>


            
            </td>

            

            

            <td class="description last">Denormalized point position</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="model.js.html">model.js</a>, <a href="model.js.html#line404">line 404</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    - Returns true if there are no pieces at that point
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Client.html">Client</a></li><li><a href="Dice.html">Dice</a></li><li><a href="Game.html">Game</a></li><li><a href="Match.html">Match</a></li><li><a href="MoveAction.html">MoveAction</a></li><li><a href="Piece.html">Piece</a></li><li><a href="Player.html">Player</a></li><li><a href="PlayerStats.html">PlayerStats</a></li><li><a href="Random.html">Random</a></li><li><a href="Rule.html">Rule</a></li><li><a href="RuleBgCasual.html">RuleBgCasual</a></li><li><a href="RuleBgGulbara.html">RuleBgGulbara</a></li><li><a href="RuleBgTapa.html">RuleBgTapa</a></li><li><a href="State.html">State</a></li><li><a href="Utils.html">Utils</a></li></ul><h3>Global</h3><ul><li><a href="global.html#Message">Message</a></li><li><a href="global.html#MoveActionType">MoveActionType</a></li><li><a href="global.html#PieceType">PieceType</a></li><li><a href="global.html#Protocol">Protocol</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Sun Dec 18 2016 20:10:06 GMT+0200 (EET)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>