chess 0.3.0 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +12 -0
  3. data/.github/workflows/ruby.yml +58 -0
  4. data/.gitignore +3 -2
  5. data/.rubocop.yml +10 -142
  6. data/Gemfile.lock +74 -0
  7. data/README.md +26 -22
  8. data/Rakefile +2 -1
  9. data/chess.gemspec +11 -7
  10. data/docs/Chess/BadNotationError.html +237 -0
  11. data/docs/Chess/Board.html +1759 -0
  12. data/docs/Chess/CGame.html +2296 -0
  13. data/docs/Chess/Game.html +1277 -0
  14. data/docs/Chess/Gnuchess.html +366 -0
  15. data/docs/Chess/IllegalMoveError.html +137 -0
  16. data/docs/Chess/InvalidFenFormatError.html +237 -0
  17. data/docs/Chess/InvalidPgnFormatError.html +217 -0
  18. data/docs/Chess/Pgn.html +1477 -0
  19. data/docs/Chess/UTF8Notation.html +270 -0
  20. data/docs/Chess.html +157 -0
  21. data/docs/_index.html +217 -0
  22. data/docs/class_list.html +51 -0
  23. data/docs/css/common.css +1 -0
  24. data/docs/css/full_list.css +58 -0
  25. data/docs/css/style.css +497 -0
  26. data/docs/file.README.html +116 -0
  27. data/docs/file_list.html +56 -0
  28. data/docs/frames.html +17 -0
  29. data/docs/index.html +116 -0
  30. data/docs/js/app.js +314 -0
  31. data/docs/js/full_list.js +216 -0
  32. data/docs/js/jquery.js +4 -0
  33. data/docs/method_list.html +531 -0
  34. data/docs/top-level-namespace.html +110 -0
  35. data/ext/chess.c +1 -1
  36. data/ext/common.h +7 -3
  37. data/ext/extconf.rb +1 -1
  38. data/lib/chess/game.rb +68 -66
  39. data/lib/chess/gnuchess.rb +49 -53
  40. data/lib/chess/pgn.rb +13 -15
  41. data/lib/chess/version.rb +1 -1
  42. data/test/test_big_pgn_collection.rb +1 -1
  43. data/test/test_checkmate.rb +4 -4
  44. data/test/test_errors.rb +22 -0
  45. data/test/test_fifty_rule_move.rb +2 -2
  46. data/test/test_game.rb +82 -0
  47. data/test/test_helper.rb +15 -0
  48. data/test/test_insufficient_material.rb +4 -4
  49. data/test/test_move_generator.rb +3 -2
  50. data/test/test_pgn.rb +35 -0
  51. data/test/test_pgn_collection.rb +2 -2
  52. data/test/test_stalemate.rb +1 -1
  53. data/test/test_threefold_repetition.rb +1 -1
  54. data/test/test_uci_castling.rb +34 -0
  55. metadata +118 -1236
@@ -0,0 +1,237 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Exception: Chess::BadNotationError
8
+
9
+ &mdash; Chess
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Chess::BadNotationError";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Chess.html" title="Chess (module)">Chess</a></span></span>
41
+ &raquo;
42
+ <span class="title">BadNotationError</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Exception: Chess::BadNotationError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">StandardError</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next">Chess::BadNotationError</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/chess/exceptions.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>This exception will be raised when an invalid short algebraic chess notation string is passed to the <span class='object_link'><a href="Game.html#move-instance_method" title="Chess::Game#move (method)">Game#move</a></span> function.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Instance Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(notation) &#x21d2; BadNotationError </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+ <span class="note title constructor">constructor</span>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'>
150
+ <p>A new instance of BadNotationError.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ </ul>
157
+
158
+
159
+
160
+ <div id="constructor_details" class="method_details_list">
161
+ <h2>Constructor Details</h2>
162
+
163
+ <div class="method_details first">
164
+ <h3 class="signature first" id="initialize-instance_method">
165
+
166
+ #<strong>initialize</strong>(notation) &#x21d2; <tt><span class='object_link'><a href="" title="Chess::BadNotationError (class)">BadNotationError</a></span></tt>
167
+
168
+
169
+
170
+
171
+
172
+ </h3><div class="docstring">
173
+ <div class="discussion">
174
+
175
+ <p>Returns a new instance of BadNotationError.</p>
176
+
177
+
178
+ </div>
179
+ </div>
180
+ <div class="tags">
181
+ <p class="tag_title">Parameters:</p>
182
+ <ul class="param">
183
+
184
+ <li>
185
+
186
+ <span class='name'>notation</span>
187
+
188
+
189
+ <span class='type'>(<tt>String</tt>)</span>
190
+
191
+
192
+
193
+ &mdash;
194
+ <div class='inline'>
195
+ <p>The invalid notation.</p>
196
+ </div>
197
+
198
+ </li>
199
+
200
+ </ul>
201
+
202
+
203
+ </div><table class="source_code">
204
+ <tr>
205
+ <td>
206
+ <pre class="lines">
207
+
208
+
209
+ 6
210
+ 7
211
+ 8</pre>
212
+ </td>
213
+ <td>
214
+ <pre class="code"><span class="info file"># File 'lib/chess/exceptions.rb', line 6</span>
215
+
216
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_notation'>notation</span><span class='rparen'>)</span>
217
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Invalid notation &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_notation'>notation</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
218
+ <span class='kw'>end</span></pre>
219
+ </td>
220
+ </tr>
221
+ </table>
222
+ </div>
223
+
224
+ </div>
225
+
226
+
227
+ </div>
228
+
229
+ <div id="footer">
230
+ Generated on Thu Jan 28 17:31:40 2021 by
231
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
232
+ 0.9.26 (ruby-2.6.1).
233
+ </div>
234
+
235
+ </div>
236
+ </body>
237
+ </html>