Skip to content

Commit

Permalink
Added lookup tables docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hrushikeshrv committed Mar 7, 2023
1 parent 437db0b commit e5d2eb2
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 12 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/ref/chessengine.lookup_tables.doctree
Binary file not shown.
29 changes: 25 additions & 4 deletions docs/_build/html/_sources/ref/chessengine.lookup_tables.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,32 @@ chessengine.lookup\_tables
:type: dict[int, int]

A dictionary mapping ranks to a bitboard having 1s only on that rank. For example,
``mask_rank[1]`` is a bitboard having only 1s on positions on the first rank,
and 0s on all other position.
A dictionary mapping ranks to a bitboard having 1s only on that rank, and 0s on all
other ranks. For example, ``mask_rank[1]`` is a bitboard having only 1s on positions
on the first rank, and 0s on all other position.


.. py:data:: clear_file
:type: dict[int, int]
:type: dict[int, int]

A dictionary mapping files to a bitboard having 0s only on that file, and 1s on all
other ranks. For example, ``clear_file[1]`` is a bitboard having only 0s on positions
on the first file, and 1s on all other positions.


.. py:data:: mask_file
:type: dict[int, int]

A dictionary mapping files to a bitboard having 1s only on that file, and 0s on all
other ranks. For example, ``mask_file[1]`` is a bitboard having only 1s on positions
on the first file, and 0s on all other positions.


.. py:data:: clear_position
:type: dict[int, int]

A dictionary mapping *positions* to bitboards with a 0 at that position and 1 at all
other positions.
2 changes: 2 additions & 0 deletions docs/_build/html/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ <h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<li class="toctree-l2"><a class="reference internal" href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.clear_rank"><code class="docutils literal notranslate"><span class="pre">clear_rank</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.mask_rank"><code class="docutils literal notranslate"><span class="pre">mask_rank</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.clear_file"><code class="docutils literal notranslate"><span class="pre">clear_file</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.mask_file"><code class="docutils literal notranslate"><span class="pre">mask_file</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.clear_position"><code class="docutils literal notranslate"><span class="pre">clear_position</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ref/chessengine.moves.html">chessengine.moves</a><ul>
Expand Down
4 changes: 4 additions & 0 deletions docs/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ <h2>C</h2>
<li><a href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.clear_file">clear_file (in module chessengine.lookup_tables)</a>
</li>
<li><a href="ref/chessengine.utils.html#chessengine.utils.clear_lines">clear_lines() (in module chessengine.utils)</a>
</li>
<li><a href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.clear_position">clear_position (in module chessengine.lookup_tables)</a>
</li>
<li><a href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.clear_rank">clear_rank (in module chessengine.lookup_tables)</a>
</li>
Expand Down Expand Up @@ -411,6 +413,8 @@ <h2>M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ref/chessengine.bitboard.html#chessengine.bitboard.Board.make_moves">make_moves() (chessengine.bitboard.Board method)</a>
</li>
<li><a href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.mask_file">mask_file (in module chessengine.lookup_tables)</a>
</li>
<li><a href="ref/chessengine.lookup_tables.html#chessengine.lookup_tables.mask_rank">mask_rank (in module chessengine.lookup_tables)</a>
</li>
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
36 changes: 33 additions & 3 deletions docs/_build/html/ref/chessengine.lookup_tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@
<dd class="field-odd"><p>dict[int, int]</p>
</dd>
</dl>
<p>A dictionary mapping ranks to a bitboard having 1s only on that rank. For example,
<code class="docutils literal notranslate"><span class="pre">mask_rank[1]</span></code> is a bitboard having only 1s on positions on the first rank,
and 0s on all other position.</p>
<p>A dictionary mapping ranks to a bitboard having 1s only on that rank, and 0s on all
other ranks. For example, <code class="docutils literal notranslate"><span class="pre">mask_rank[1]</span></code> is a bitboard having only 1s on positions
on the first rank, and 0s on all other position.</p>
</dd></dl>

<dl class="py data">
Expand All @@ -265,6 +265,34 @@
<dd class="field-odd"><p>dict[int, int]</p>
</dd>
</dl>
<p>A dictionary mapping files to a bitboard having 0s only on that file, and 1s on all
other ranks. For example, <code class="docutils literal notranslate"><span class="pre">clear_file[1]</span></code> is a bitboard having only 0s on positions
on the first file, and 1s on all other positions.</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="chessengine.lookup_tables.mask_file">
<span class="sig-prename descclassname"><span class="pre">chessengine.lookup_tables.</span></span><span class="sig-name descname"><span class="pre">mask_file</span></span><a class="headerlink" href="#chessengine.lookup_tables.mask_file" title="Permalink to this definition">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[int, int]</p>
</dd>
</dl>
<p>A dictionary mapping files to a bitboard having 1s only on that file, and 0s on all
other ranks. For example, <code class="docutils literal notranslate"><span class="pre">mask_file[1]</span></code> is a bitboard having only 1s on positions
on the first file, and 0s on all other positions.</p>
</dd></dl>

<dl class="py data">
<dt class="sig sig-object py" id="chessengine.lookup_tables.clear_position">
<span class="sig-prename descclassname"><span class="pre">chessengine.lookup_tables.</span></span><span class="sig-name descname"><span class="pre">clear_position</span></span><a class="headerlink" href="#chessengine.lookup_tables.clear_position" title="Permalink to this definition">#</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict[int, int]</p>
</dd>
</dl>
<p>A dictionary mapping <em>positions</em> to bitboards with a 0 at that position and 1 at all
other positions.</p>
</dd></dl>

</section>
Expand Down Expand Up @@ -330,6 +358,8 @@
<li><a class="reference internal" href="#chessengine.lookup_tables.clear_rank"><code class="docutils literal notranslate"><span class="pre">clear_rank</span></code></a></li>
<li><a class="reference internal" href="#chessengine.lookup_tables.mask_rank"><code class="docutils literal notranslate"><span class="pre">mask_rank</span></code></a></li>
<li><a class="reference internal" href="#chessengine.lookup_tables.clear_file"><code class="docutils literal notranslate"><span class="pre">clear_file</span></code></a></li>
<li><a class="reference internal" href="#chessengine.lookup_tables.mask_file"><code class="docutils literal notranslate"><span class="pre">mask_file</span></code></a></li>
<li><a class="reference internal" href="#chessengine.lookup_tables.clear_position"><code class="docutils literal notranslate"><span class="pre">clear_position</span></code></a></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

29 changes: 25 additions & 4 deletions docs/ref/chessengine.lookup_tables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,32 @@ chessengine.lookup\_tables
:type: dict[int, int]

A dictionary mapping ranks to a bitboard having 1s only on that rank. For example,
``mask_rank[1]`` is a bitboard having only 1s on positions on the first rank,
and 0s on all other position.
A dictionary mapping ranks to a bitboard having 1s only on that rank, and 0s on all
other ranks. For example, ``mask_rank[1]`` is a bitboard having only 1s on positions
on the first rank, and 0s on all other position.


.. py:data:: clear_file
:type: dict[int, int]
:type: dict[int, int]

A dictionary mapping files to a bitboard having 0s only on that file, and 1s on all
other ranks. For example, ``clear_file[1]`` is a bitboard having only 0s on positions
on the first file, and 1s on all other positions.


.. py:data:: mask_file
:type: dict[int, int]

A dictionary mapping files to a bitboard having 1s only on that file, and 0s on all
other ranks. For example, ``mask_file[1]`` is a bitboard having only 1s on positions
on the first file, and 0s on all other positions.


.. py:data:: clear_position
:type: dict[int, int]

A dictionary mapping *positions* to bitboards with a 0 at that position and 1 at all
other positions.

0 comments on commit e5d2eb2

Please sign in to comment.