Skip to content

Commit

Permalink
set_sfen, set_position, set_hcp, set_psfenの例外の説明追記
Browse files Browse the repository at this point in the history
  • Loading branch information
TadaoYamaoka committed Jan 16, 2024
1 parent 76eddb0 commit e0a2028
Show file tree
Hide file tree
Showing 12 changed files with 192 additions and 172 deletions.
Binary file modified .doctrees/cshogi.dlshogi.doctree
Binary file not shown.
Binary file modified .doctrees/cshogi.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
4 changes: 1 addition & 3 deletions _modules/cshogi/KI2.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,9 @@ <h1>Source code for cshogi.KI2</h1><div class="highlight"><pre>
<span class="n">from_square2</span> <span class="o">=</span> <span class="n">move_from</span><span class="p">(</span><span class="n">move2</span><span class="p">)</span>
<span class="c1"># 後手は180度回転</span>
<span class="n">from_file2</span><span class="p">,</span> <span class="n">from_rank2</span> <span class="o">=</span> <span class="nb">divmod</span><span class="p">(</span><span class="n">from_square2</span> <span class="k">if</span> <span class="n">board</span><span class="o">.</span><span class="n">turn</span> <span class="o">==</span> <span class="n">cshogi</span><span class="o">.</span><span class="n">BLACK</span> <span class="k">else</span> <span class="mi">80</span> <span class="o">-</span> <span class="n">from_square2</span><span class="p">,</span> <span class="mi">9</span><span class="p">)</span>
<span class="k">if</span> <span class="n">from_file2</span> <span class="o">==</span> <span class="n">to_file</span> <span class="ow">and</span> <span class="n">from_rank2</span> <span class="o">&gt;</span> <span class="n">to_rank</span><span class="p">:</span> <span class="c1"># 直</span>
<span class="k">continue</span>
<span class="k">if</span> <span class="n">from_file2</span> <span class="o">&gt;</span> <span class="n">to_file</span><span class="p">:</span> <span class="c1"># 左</span>
<span class="n">candidates_left</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">elif</span> <span class="n">from_file2</span> <span class="o">&lt;</span> <span class="n">to_file</span><span class="p">:</span> <span class="c1"># 右</span>
<span class="n">candidates_right</span> <span class="o">+=</span> <span class="mi">1</span>

<span class="k">if</span> <span class="n">from_rank2</span> <span class="o">&gt;</span> <span class="n">to_rank</span><span class="p">:</span> <span class="c1"># 上</span>
Expand Down
18 changes: 9 additions & 9 deletions _modules/cshogi/PGN.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ <h1>Source code for cshogi.PGN</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>

<span class="n">PGN_SQUARE_NAMES</span> <span class="o">=</span> <span class="p">[</span>
<span class="s1">&#39;i9&#39;</span><span class="p">,</span> <span class="s1">&#39;i8&#39;</span><span class="p">,</span> <span class="s1">&#39;i7&#39;</span><span class="p">,</span> <span class="s1">&#39;i6&#39;</span><span class="p">,</span> <span class="s1">&#39;i5&#39;</span><span class="p">,</span> <span class="s1">&#39;i4&#39;</span><span class="p">,</span> <span class="s1">&#39;i3&#39;</span><span class="p">,</span> <span class="s1">&#39;i2&#39;</span><span class="p">,</span> <span class="s1">&#39;i1&#39;</span><span class="p">,</span>
<span class="s1">&#39;h9&#39;</span><span class="p">,</span> <span class="s1">&#39;h8&#39;</span><span class="p">,</span> <span class="s1">&#39;h7&#39;</span><span class="p">,</span> <span class="s1">&#39;h6&#39;</span><span class="p">,</span> <span class="s1">&#39;h5&#39;</span><span class="p">,</span> <span class="s1">&#39;h4&#39;</span><span class="p">,</span> <span class="s1">&#39;h3&#39;</span><span class="p">,</span> <span class="s1">&#39;h2&#39;</span><span class="p">,</span> <span class="s1">&#39;h1&#39;</span><span class="p">,</span>
<span class="s1">&#39;g9&#39;</span><span class="p">,</span> <span class="s1">&#39;g8&#39;</span><span class="p">,</span> <span class="s1">&#39;g7&#39;</span><span class="p">,</span> <span class="s1">&#39;g6&#39;</span><span class="p">,</span> <span class="s1">&#39;g5&#39;</span><span class="p">,</span> <span class="s1">&#39;g4&#39;</span><span class="p">,</span> <span class="s1">&#39;g3&#39;</span><span class="p">,</span> <span class="s1">&#39;g2&#39;</span><span class="p">,</span> <span class="s1">&#39;g1&#39;</span><span class="p">,</span>
<span class="s1">&#39;f9&#39;</span><span class="p">,</span> <span class="s1">&#39;f8&#39;</span><span class="p">,</span> <span class="s1">&#39;f7&#39;</span><span class="p">,</span> <span class="s1">&#39;f6&#39;</span><span class="p">,</span> <span class="s1">&#39;f5&#39;</span><span class="p">,</span> <span class="s1">&#39;f4&#39;</span><span class="p">,</span> <span class="s1">&#39;f3&#39;</span><span class="p">,</span> <span class="s1">&#39;f2&#39;</span><span class="p">,</span> <span class="s1">&#39;f1&#39;</span><span class="p">,</span>
<span class="s1">&#39;e9&#39;</span><span class="p">,</span> <span class="s1">&#39;e8&#39;</span><span class="p">,</span> <span class="s1">&#39;e7&#39;</span><span class="p">,</span> <span class="s1">&#39;e6&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e3&#39;</span><span class="p">,</span> <span class="s1">&#39;e2&#39;</span><span class="p">,</span> <span class="s1">&#39;e1&#39;</span><span class="p">,</span>
<span class="s1">&#39;d9&#39;</span><span class="p">,</span> <span class="s1">&#39;d8&#39;</span><span class="p">,</span> <span class="s1">&#39;d7&#39;</span><span class="p">,</span> <span class="s1">&#39;d6&#39;</span><span class="p">,</span> <span class="s1">&#39;d5&#39;</span><span class="p">,</span> <span class="s1">&#39;d4&#39;</span><span class="p">,</span> <span class="s1">&#39;d3&#39;</span><span class="p">,</span> <span class="s1">&#39;d2&#39;</span><span class="p">,</span> <span class="s1">&#39;d1&#39;</span><span class="p">,</span>
<span class="s1">&#39;c9&#39;</span><span class="p">,</span> <span class="s1">&#39;c8&#39;</span><span class="p">,</span> <span class="s1">&#39;c7&#39;</span><span class="p">,</span> <span class="s1">&#39;c6&#39;</span><span class="p">,</span> <span class="s1">&#39;c5&#39;</span><span class="p">,</span> <span class="s1">&#39;c4&#39;</span><span class="p">,</span> <span class="s1">&#39;c3&#39;</span><span class="p">,</span> <span class="s1">&#39;c2&#39;</span><span class="p">,</span> <span class="s1">&#39;c1&#39;</span><span class="p">,</span>
<span class="s1">&#39;b9&#39;</span><span class="p">,</span> <span class="s1">&#39;b8&#39;</span><span class="p">,</span> <span class="s1">&#39;b7&#39;</span><span class="p">,</span> <span class="s1">&#39;b6&#39;</span><span class="p">,</span> <span class="s1">&#39;b5&#39;</span><span class="p">,</span> <span class="s1">&#39;b4&#39;</span><span class="p">,</span> <span class="s1">&#39;b3&#39;</span><span class="p">,</span> <span class="s1">&#39;b2&#39;</span><span class="p">,</span> <span class="s1">&#39;b1&#39;</span><span class="p">,</span>
<span class="s1">&#39;a9&#39;</span><span class="p">,</span> <span class="s1">&#39;a8&#39;</span><span class="p">,</span> <span class="s1">&#39;a7&#39;</span><span class="p">,</span> <span class="s1">&#39;a6&#39;</span><span class="p">,</span> <span class="s1">&#39;a5&#39;</span><span class="p">,</span> <span class="s1">&#39;a4&#39;</span><span class="p">,</span> <span class="s1">&#39;a3&#39;</span><span class="p">,</span> <span class="s1">&#39;a2&#39;</span><span class="p">,</span> <span class="s1">&#39;a1&#39;</span><span class="p">,</span>
<span class="s1">&#39;i9&#39;</span><span class="p">,</span> <span class="s1">&#39;i8&#39;</span><span class="p">,</span> <span class="s1">&#39;i7&#39;</span><span class="p">,</span> <span class="s1">&#39;i6&#39;</span><span class="p">,</span> <span class="s1">&#39;i5&#39;</span><span class="p">,</span> <span class="s1">&#39;i4&#39;</span><span class="p">,</span> <span class="s1">&#39;i3&#39;</span><span class="p">,</span> <span class="s1">&#39;i2&#39;</span><span class="p">,</span> <span class="s1">&#39;i1&#39;</span><span class="p">,</span>
<span class="s1">&#39;h9&#39;</span><span class="p">,</span> <span class="s1">&#39;h8&#39;</span><span class="p">,</span> <span class="s1">&#39;h7&#39;</span><span class="p">,</span> <span class="s1">&#39;h6&#39;</span><span class="p">,</span> <span class="s1">&#39;h5&#39;</span><span class="p">,</span> <span class="s1">&#39;h4&#39;</span><span class="p">,</span> <span class="s1">&#39;h3&#39;</span><span class="p">,</span> <span class="s1">&#39;h2&#39;</span><span class="p">,</span> <span class="s1">&#39;h1&#39;</span><span class="p">,</span>
<span class="s1">&#39;g9&#39;</span><span class="p">,</span> <span class="s1">&#39;g8&#39;</span><span class="p">,</span> <span class="s1">&#39;g7&#39;</span><span class="p">,</span> <span class="s1">&#39;g6&#39;</span><span class="p">,</span> <span class="s1">&#39;g5&#39;</span><span class="p">,</span> <span class="s1">&#39;g4&#39;</span><span class="p">,</span> <span class="s1">&#39;g3&#39;</span><span class="p">,</span> <span class="s1">&#39;g2&#39;</span><span class="p">,</span> <span class="s1">&#39;g1&#39;</span><span class="p">,</span>
<span class="s1">&#39;f9&#39;</span><span class="p">,</span> <span class="s1">&#39;f8&#39;</span><span class="p">,</span> <span class="s1">&#39;f7&#39;</span><span class="p">,</span> <span class="s1">&#39;f6&#39;</span><span class="p">,</span> <span class="s1">&#39;f5&#39;</span><span class="p">,</span> <span class="s1">&#39;f4&#39;</span><span class="p">,</span> <span class="s1">&#39;f3&#39;</span><span class="p">,</span> <span class="s1">&#39;f2&#39;</span><span class="p">,</span> <span class="s1">&#39;f1&#39;</span><span class="p">,</span>
<span class="s1">&#39;e9&#39;</span><span class="p">,</span> <span class="s1">&#39;e8&#39;</span><span class="p">,</span> <span class="s1">&#39;e7&#39;</span><span class="p">,</span> <span class="s1">&#39;e6&#39;</span><span class="p">,</span> <span class="s1">&#39;e5&#39;</span><span class="p">,</span> <span class="s1">&#39;e4&#39;</span><span class="p">,</span> <span class="s1">&#39;e3&#39;</span><span class="p">,</span> <span class="s1">&#39;e2&#39;</span><span class="p">,</span> <span class="s1">&#39;e1&#39;</span><span class="p">,</span>
<span class="s1">&#39;d9&#39;</span><span class="p">,</span> <span class="s1">&#39;d8&#39;</span><span class="p">,</span> <span class="s1">&#39;d7&#39;</span><span class="p">,</span> <span class="s1">&#39;d6&#39;</span><span class="p">,</span> <span class="s1">&#39;d5&#39;</span><span class="p">,</span> <span class="s1">&#39;d4&#39;</span><span class="p">,</span> <span class="s1">&#39;d3&#39;</span><span class="p">,</span> <span class="s1">&#39;d2&#39;</span><span class="p">,</span> <span class="s1">&#39;d1&#39;</span><span class="p">,</span>
<span class="s1">&#39;c9&#39;</span><span class="p">,</span> <span class="s1">&#39;c8&#39;</span><span class="p">,</span> <span class="s1">&#39;c7&#39;</span><span class="p">,</span> <span class="s1">&#39;c6&#39;</span><span class="p">,</span> <span class="s1">&#39;c5&#39;</span><span class="p">,</span> <span class="s1">&#39;c4&#39;</span><span class="p">,</span> <span class="s1">&#39;c3&#39;</span><span class="p">,</span> <span class="s1">&#39;c2&#39;</span><span class="p">,</span> <span class="s1">&#39;c1&#39;</span><span class="p">,</span>
<span class="s1">&#39;b9&#39;</span><span class="p">,</span> <span class="s1">&#39;b8&#39;</span><span class="p">,</span> <span class="s1">&#39;b7&#39;</span><span class="p">,</span> <span class="s1">&#39;b6&#39;</span><span class="p">,</span> <span class="s1">&#39;b5&#39;</span><span class="p">,</span> <span class="s1">&#39;b4&#39;</span><span class="p">,</span> <span class="s1">&#39;b3&#39;</span><span class="p">,</span> <span class="s1">&#39;b2&#39;</span><span class="p">,</span> <span class="s1">&#39;b1&#39;</span><span class="p">,</span>
<span class="s1">&#39;a9&#39;</span><span class="p">,</span> <span class="s1">&#39;a8&#39;</span><span class="p">,</span> <span class="s1">&#39;a7&#39;</span><span class="p">,</span> <span class="s1">&#39;a6&#39;</span><span class="p">,</span> <span class="s1">&#39;a5&#39;</span><span class="p">,</span> <span class="s1">&#39;a4&#39;</span><span class="p">,</span> <span class="s1">&#39;a3&#39;</span><span class="p">,</span> <span class="s1">&#39;a2&#39;</span><span class="p">,</span> <span class="s1">&#39;a1&#39;</span><span class="p">,</span>
<span class="p">]</span>

<span class="n">PGN_HAND_PIECES</span> <span class="o">=</span> <span class="p">[</span>
Expand Down
Loading

0 comments on commit e0a2028

Please sign in to comment.