docs/Chess/Game.html in chess-0.3.6 vs docs/Chess/Game.html in chess-0.4.0

- old
+ new

@@ -465,17 +465,17 @@ <tr> <td> <pre class="lines"> +7 +8 9 -10 -11 -12</pre> +10</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 9</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 7</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_moves'>moves</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='id identifier rubyid_moves'>moves</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> @@ -569,20 +569,20 @@ <tr> <td> <pre class="lines"> +40 +41 42 43 44 45 -46 -47 -48</pre> +46</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 42</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 40</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_fen'>load_fen</span><span class='lparen'>(</span><span class='id identifier rubyid_fen'>fen</span><span class='rparen'>)</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="InvalidFenFormatError.html" title="Chess::InvalidFenFormatError (class)">InvalidFenFormatError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="InvalidFenFormatError.html#initialize-instance_method" title="Chess::InvalidFenFormatError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_fen'>fen</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^((?:[PRNBQKprnbqk1-8]{1,8}\/){7}[RNBQKPrnbqkp1-8]{1,8})\s(w|b)\s(K?Q?k?q?|-)\s([a-h][1-8]|-)\s(\d+)\s(\d+)$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_fen'>fen</span><span class='rparen'>)</span> <span class='id identifier rubyid_game'>game</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Chess.html" title="Chess (module)">Chess</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Chess::Game (class)">Game</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Chess::Game#initialize (method)">new</a></span></span> @@ -682,10 +682,12 @@ <tr> <td> <pre class="lines"> +18 +19 20 21 22 23 24 @@ -695,16 +697,14 @@ 28 29 30 31 32 -33 -34 -35</pre> +33</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 20</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 18</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_pgn'>load_pgn</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span> <span class='id identifier rubyid_pgn'>pgn</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Chess.html" title="Chess (module)">Chess</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Pgn.html" title="Chess::Pgn (class)">Pgn</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Pgn.html#initialize-instance_method" title="Chess::Pgn#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span> <span class='id identifier rubyid_game'>game</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Chess.html" title="Chess (module)">Chess</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Chess::Game (class)">Game</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Chess::Game#initialize (method)">new</a></span></span> <span class='id identifier rubyid_pgn'>pgn</span><span class='period'>.</span><span class='id identifier rubyid_moves'>moves</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_game'>game</span><span class='period'>.</span><span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='rparen'>)</span> <span class='rbrace'>}</span> @@ -768,16 +768,16 @@ <tr> <td> <pre class="lines"> -85 -86 -87</pre> +83 +84 +85</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 85</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 83</span> <span class='kw'>def</span> <span class='id identifier rubyid_active_player'>active_player</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_board'>board</span><span class='period'>.</span><span class='id identifier rubyid_active_color'>active_color</span> <span class='op'>?</span> <span class='symbol'>:black</span> <span class='op'>:</span> <span class='symbol'>:white</span> <span class='kw'>end</span></pre> </td> @@ -822,16 +822,16 @@ <tr> <td> <pre class="lines"> -92 -93 -94</pre> +90 +91 +92</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 92</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 90</span> <span class='kw'>def</span> <span class='id identifier rubyid_inactive_player'>inactive_player</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_board'>board</span><span class='period'>.</span><span class='id identifier rubyid_active_color'>active_color</span> <span class='op'>?</span> <span class='symbol'>:white</span> <span class='op'>:</span> <span class='symbol'>:black</span> <span class='kw'>end</span></pre> </td> @@ -881,11 +881,11 @@ &mdash; <div class='inline'> -<p>Represents the short algebraic chess notation string of the move. <code>notation</code> can be also <em>from_square</em> plus <em>to_square</em> <em>(&#39;e2e4&#39;, …, &#39;b1c3&#39;)</em> (coordinate chess notation).</p> +<p>Represents the short algebraic chess notation string of the move. <code>notation</code> can be also <em>from_square</em> plus <em>to_square</em> <em>(‘e2e4’, …, ‘b1c3’)</em> (coordinate chess notation).</p> </div> </li> </ul> @@ -945,25 +945,25 @@ <tr> <td> <pre class="lines"> +59 +60 61 62 63 64 65 66 67 68 69 -70 -71 -72</pre> +70</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 61</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 59</span> <span class='kw'>def</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_notation'>notation</span><span class='rparen'>)</span> <span class='id identifier rubyid_expand'>expand</span> <span class='op'>=</span> <span class='id identifier rubyid_expand_move'>expand_move</span><span class='lparen'>(</span><span class='id identifier rubyid_notation'>notation</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_expand'>expand</span><span class='lbracket'>[</span><span class='symbol'>:from</span><span class='rbracket'>]</span> <span class='id identifier rubyid_move2'>move2</span><span class='lparen'>(</span><span class='id identifier rubyid_expand'>expand</span><span class='lbracket'>[</span><span class='symbol'>:from</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_expand'>expand</span><span class='lbracket'>[</span><span class='symbol'>:to</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_expand'>expand</span><span class='lbracket'>[</span><span class='symbol'>:promotion</span><span class='rbracket'>]</span><span class='rparen'>)</span> @@ -1024,16 +1024,16 @@ <tr> <td> <pre class="lines"> -78 -79 -80</pre> +76 +77 +78</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 78</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 76</span> <span class='kw'>def</span> <span class='id identifier rubyid_moves='>moves=</span><span class='lparen'>(</span><span class='id identifier rubyid_moves'>moves</span><span class='rparen'>)</span> <span class='id identifier rubyid_moves'>moves</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> @@ -1078,16 +1078,16 @@ <tr> <td> <pre class="lines"> -131 -132 -133</pre> +129 +130 +131</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 131</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 129</span> <span class='kw'>def</span> <span class='id identifier rubyid_over?'>over?</span> <span class='kw'>return</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>end</span></pre> </td> @@ -1132,19 +1132,19 @@ <tr> <td> <pre class="lines"> +135 +136 137 138 139 -140 -141 -142</pre> +140</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 137</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 135</span> <span class='kw'>def</span> <span class='id identifier rubyid_pgn'>pgn</span> <span class='id identifier rubyid_pgn'>pgn</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Chess.html" title="Chess (module)">Chess</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Pgn.html" title="Chess::Pgn (class)">Pgn</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Pgn.html#initialize-instance_method" title="Chess::Pgn#initialize (method)">new</a></span></span> <span class='id identifier rubyid_pgn'>pgn</span><span class='period'>.</span><span class='id identifier rubyid_moves'>moves</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_moves'>moves</span> <span class='id identifier rubyid_pgn'>pgn</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span> @@ -1211,10 +1211,12 @@ <tr> <td> <pre class="lines"> +107 +108 109 110 111 112 113 @@ -1228,16 +1230,14 @@ 121 122 123 124 125 -126 -127 -128</pre> +126</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 109</span> + <pre class="code"><span class="info file"># File 'lib/chess/game.rb', line 107</span> <span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span> <span class='kw'>case</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_result'>result</span> <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>return</span> <span class='symbol'>:in_progress</span> @@ -1265,12 +1265,12 @@ </div> </div> <div id="footer"> - Generated on Thu Jan 28 17:31:40 2021 by - <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.9.26 (ruby-2.6.1). + Generated on Fri Aug 30 11:09:51 2024 by + <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> + 0.9.36 (ruby-3.3.2). </div> </div> </body> </html> \ No newline at end of file