chess 0.3.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
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,531 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>Method List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">Method List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="method">
45
+
46
+
47
+ <li class="odd ">
48
+ <div class="item">
49
+ <span class='object_link'><a href="Chess/Board.html#[]-instance_method" title="Chess::Board#[] (method)">#[]</a></span>
50
+ <small>Chess::Board</small>
51
+ </div>
52
+ </li>
53
+
54
+
55
+ <li class="even ">
56
+ <div class="item">
57
+ <span class='object_link'><a href="Chess/CGame.html#[]-instance_method" title="Chess::CGame#[] (method)">#[]</a></span>
58
+ <small>Chess::CGame</small>
59
+ </div>
60
+ </li>
61
+
62
+
63
+ <li class="odd ">
64
+ <div class="item">
65
+ <span class='object_link'><a href="Chess/Board.html#active_color-instance_method" title="Chess::Board#active_color (method)">#active_color</a></span>
66
+ <small>Chess::Board</small>
67
+ </div>
68
+ </li>
69
+
70
+
71
+ <li class="even ">
72
+ <div class="item">
73
+ <span class='object_link'><a href="Chess/Game.html#active_player-instance_method" title="Chess::Game#active_player (method)">#active_player</a></span>
74
+ <small>Chess::Game</small>
75
+ </div>
76
+ </li>
77
+
78
+
79
+ <li class="odd ">
80
+ <div class="item">
81
+ <span class='object_link'><a href="Chess/Pgn.html#black-instance_method" title="Chess::Pgn#black (method)">#black</a></span>
82
+ <small>Chess::Pgn</small>
83
+ </div>
84
+ </li>
85
+
86
+
87
+ <li class="even ">
88
+ <div class="item">
89
+ <span class='object_link'><a href="Chess/Board.html#check%3F-instance_method" title="Chess::Board#check? (method)">#check?</a></span>
90
+ <small>Chess::Board</small>
91
+ </div>
92
+ </li>
93
+
94
+
95
+ <li class="odd ">
96
+ <div class="item">
97
+ <span class='object_link'><a href="Chess/Board.html#checkmate%3F-instance_method" title="Chess::Board#checkmate? (method)">#checkmate?</a></span>
98
+ <small>Chess::Board</small>
99
+ </div>
100
+ </li>
101
+
102
+
103
+ <li class="even ">
104
+ <div class="item">
105
+ <span class='object_link'><a href="Chess/CGame.html#coord_moves-instance_method" title="Chess::CGame#coord_moves (method)">#coord_moves</a></span>
106
+ <small>Chess::CGame</small>
107
+ </div>
108
+ </li>
109
+
110
+
111
+ <li class="odd ">
112
+ <div class="item">
113
+ <span class='object_link'><a href="Chess/CGame.html#current-instance_method" title="Chess::CGame#current (method)">#current</a></span>
114
+ <small>Chess::CGame</small>
115
+ </div>
116
+ </li>
117
+
118
+
119
+ <li class="even ">
120
+ <div class="item">
121
+ <span class='object_link'><a href="Chess/Pgn.html#date-instance_method" title="Chess::Pgn#date (method)">#date</a></span>
122
+ <small>Chess::Pgn</small>
123
+ </div>
124
+ </li>
125
+
126
+
127
+ <li class="odd ">
128
+ <div class="item">
129
+ <span class='object_link'><a href="Chess/CGame.html#draw-instance_method" title="Chess::CGame#draw (method)">#draw</a></span>
130
+ <small>Chess::CGame</small>
131
+ </div>
132
+ </li>
133
+
134
+
135
+ <li class="even ">
136
+ <div class="item">
137
+ <span class='object_link'><a href="Chess/CGame.html#each-instance_method" title="Chess::CGame#each (method)">#each</a></span>
138
+ <small>Chess::CGame</small>
139
+ </div>
140
+ </li>
141
+
142
+
143
+ <li class="odd ">
144
+ <div class="item">
145
+ <span class='object_link'><a href="Chess/Pgn.html#event-instance_method" title="Chess::Pgn#event (method)">#event</a></span>
146
+ <small>Chess::Pgn</small>
147
+ </div>
148
+ </li>
149
+
150
+
151
+ <li class="even ">
152
+ <div class="item">
153
+ <span class='object_link'><a href="Chess/Board.html#fifty_move_rule%3F-instance_method" title="Chess::Board#fifty_move_rule? (method)">#fifty_move_rule?</a></span>
154
+ <small>Chess::Board</small>
155
+ </div>
156
+ </li>
157
+
158
+
159
+ <li class="odd ">
160
+ <div class="item">
161
+ <span class='object_link'><a href="Chess/CGame.html#full_moves-instance_method" title="Chess::CGame#full_moves (method)">#full_moves</a></span>
162
+ <small>Chess::CGame</small>
163
+ </div>
164
+ </li>
165
+
166
+
167
+ <li class="even ">
168
+ <div class="item">
169
+ <span class='object_link'><a href="Chess/Board.html#fullmove_number-instance_method" title="Chess::Board#fullmove_number (method)">#fullmove_number</a></span>
170
+ <small>Chess::Board</small>
171
+ </div>
172
+ </li>
173
+
174
+
175
+ <li class="odd ">
176
+ <div class="item">
177
+ <span class='object_link'><a href="Chess/Board.html#generate_moves-instance_method" title="Chess::Board#generate_moves (method)">#generate_moves</a></span>
178
+ <small>Chess::Board</small>
179
+ </div>
180
+ </li>
181
+
182
+
183
+ <li class="even ">
184
+ <div class="item">
185
+ <span class='object_link'><a href="Chess/Gnuchess.html#gnuchess_move-instance_method" title="Chess::Gnuchess#gnuchess_move (method)">#gnuchess_move</a></span>
186
+ <small>Chess::Gnuchess</small>
187
+ </div>
188
+ </li>
189
+
190
+
191
+ <li class="odd ">
192
+ <div class="item">
193
+ <span class='object_link'><a href="Chess/Gnuchess.html#gnuchess_move!-instance_method" title="Chess::Gnuchess#gnuchess_move! (method)">#gnuchess_move!</a></span>
194
+ <small>Chess::Gnuchess</small>
195
+ </div>
196
+ </li>
197
+
198
+
199
+ <li class="even ">
200
+ <div class="item">
201
+ <span class='object_link'><a href="Chess/Board.html#halfmove_clock-instance_method" title="Chess::Board#halfmove_clock (method)">#halfmove_clock</a></span>
202
+ <small>Chess::Board</small>
203
+ </div>
204
+ </li>
205
+
206
+
207
+ <li class="odd ">
208
+ <div class="item">
209
+ <span class='object_link'><a href="Chess/Game.html#inactive_player-instance_method" title="Chess::Game#inactive_player (method)">#inactive_player</a></span>
210
+ <small>Chess::Game</small>
211
+ </div>
212
+ </li>
213
+
214
+
215
+ <li class="even ">
216
+ <div class="item">
217
+ <span class='object_link'><a href="Chess/Game.html#initialize-instance_method" title="Chess::Game#initialize (method)">#initialize</a></span>
218
+ <small>Chess::Game</small>
219
+ </div>
220
+ </li>
221
+
222
+
223
+ <li class="odd ">
224
+ <div class="item">
225
+ <span class='object_link'><a href="Chess/Pgn.html#initialize-instance_method" title="Chess::Pgn#initialize (method)">#initialize</a></span>
226
+ <small>Chess::Pgn</small>
227
+ </div>
228
+ </li>
229
+
230
+
231
+ <li class="even ">
232
+ <div class="item">
233
+ <span class='object_link'><a href="Chess/BadNotationError.html#initialize-instance_method" title="Chess::BadNotationError#initialize (method)">#initialize</a></span>
234
+ <small>Chess::BadNotationError</small>
235
+ </div>
236
+ </li>
237
+
238
+
239
+ <li class="odd ">
240
+ <div class="item">
241
+ <span class='object_link'><a href="Chess/InvalidPgnFormatError.html#initialize-instance_method" title="Chess::InvalidPgnFormatError#initialize (method)">#initialize</a></span>
242
+ <small>Chess::InvalidPgnFormatError</small>
243
+ </div>
244
+ </li>
245
+
246
+
247
+ <li class="even ">
248
+ <div class="item">
249
+ <span class='object_link'><a href="Chess/InvalidFenFormatError.html#initialize-instance_method" title="Chess::InvalidFenFormatError#initialize (method)">#initialize</a></span>
250
+ <small>Chess::InvalidFenFormatError</small>
251
+ </div>
252
+ </li>
253
+
254
+
255
+ <li class="odd ">
256
+ <div class="item">
257
+ <span class='object_link'><a href="Chess/Board.html#insufficient_material%3F-instance_method" title="Chess::Board#insufficient_material? (method)">#insufficient_material?</a></span>
258
+ <small>Chess::Board</small>
259
+ </div>
260
+ </li>
261
+
262
+
263
+ <li class="even ">
264
+ <div class="item">
265
+ <span class='object_link'><a href="Chess/Pgn.html#load-instance_method" title="Chess::Pgn#load (method)">#load</a></span>
266
+ <small>Chess::Pgn</small>
267
+ </div>
268
+ </li>
269
+
270
+
271
+ <li class="odd ">
272
+ <div class="item">
273
+ <span class='object_link'><a href="Chess/Game.html#load_fen-class_method" title="Chess::Game.load_fen (method)">load_fen</a></span>
274
+ <small>Chess::Game</small>
275
+ </div>
276
+ </li>
277
+
278
+
279
+ <li class="even ">
280
+ <div class="item">
281
+ <span class='object_link'><a href="Chess/Pgn.html#load_from_string-instance_method" title="Chess::Pgn#load_from_string (method)">#load_from_string</a></span>
282
+ <small>Chess::Pgn</small>
283
+ </div>
284
+ </li>
285
+
286
+
287
+ <li class="odd ">
288
+ <div class="item">
289
+ <span class='object_link'><a href="Chess/Game.html#load_pgn-class_method" title="Chess::Game.load_pgn (method)">load_pgn</a></span>
290
+ <small>Chess::Game</small>
291
+ </div>
292
+ </li>
293
+
294
+
295
+ <li class="even ">
296
+ <div class="item">
297
+ <span class='object_link'><a href="Chess/CGame.html#move-instance_method" title="Chess::CGame#move (method)">#move</a></span>
298
+ <small>Chess::CGame</small>
299
+ </div>
300
+ </li>
301
+
302
+
303
+ <li class="odd ">
304
+ <div class="item">
305
+ <span class='object_link'><a href="Chess/Game.html#move-instance_method" title="Chess::Game#move (method)">#move</a></span>
306
+ <small>Chess::Game</small>
307
+ </div>
308
+ </li>
309
+
310
+
311
+ <li class="even ">
312
+ <div class="item">
313
+ <span class='object_link'><a href="Chess/CGame.html#move2-instance_method" title="Chess::CGame#move2 (method)">#move2</a></span>
314
+ <small>Chess::CGame</small>
315
+ </div>
316
+ </li>
317
+
318
+
319
+ <li class="odd ">
320
+ <div class="item">
321
+ <span class='object_link'><a href="Chess/CGame.html#move3-instance_method" title="Chess::CGame#move3 (method)">#move3</a></span>
322
+ <small>Chess::CGame</small>
323
+ </div>
324
+ </li>
325
+
326
+
327
+ <li class="even ">
328
+ <div class="item">
329
+ <span class='object_link'><a href="Chess/Pgn.html#moves-instance_method" title="Chess::Pgn#moves (method)">#moves</a></span>
330
+ <small>Chess::Pgn</small>
331
+ </div>
332
+ </li>
333
+
334
+
335
+ <li class="odd ">
336
+ <div class="item">
337
+ <span class='object_link'><a href="Chess/CGame.html#moves-instance_method" title="Chess::CGame#moves (method)">#moves</a></span>
338
+ <small>Chess::CGame</small>
339
+ </div>
340
+ </li>
341
+
342
+
343
+ <li class="even ">
344
+ <div class="item">
345
+ <span class='object_link'><a href="Chess/Game.html#moves=-instance_method" title="Chess::Game#moves= (method)">#moves=</a></span>
346
+ <small>Chess::Game</small>
347
+ </div>
348
+ </li>
349
+
350
+
351
+ <li class="odd ">
352
+ <div class="item">
353
+ <span class='object_link'><a href="Chess/Board.html#only_kings%3F-instance_method" title="Chess::Board#only_kings? (method)">#only_kings?</a></span>
354
+ <small>Chess::Board</small>
355
+ </div>
356
+ </li>
357
+
358
+
359
+ <li class="even ">
360
+ <div class="item">
361
+ <span class='object_link'><a href="Chess/Game.html#over%3F-instance_method" title="Chess::Game#over? (method)">#over?</a></span>
362
+ <small>Chess::Game</small>
363
+ </div>
364
+ </li>
365
+
366
+
367
+ <li class="odd ">
368
+ <div class="item">
369
+ <span class='object_link'><a href="Chess/Game.html#pgn-instance_method" title="Chess::Game#pgn (method)">#pgn</a></span>
370
+ <small>Chess::Game</small>
371
+ </div>
372
+ </li>
373
+
374
+
375
+ <li class="even ">
376
+ <div class="item">
377
+ <span class='object_link'><a href="Chess/Board.html#placement-instance_method" title="Chess::Board#placement (method)">#placement</a></span>
378
+ <small>Chess::Board</small>
379
+ </div>
380
+ </li>
381
+
382
+
383
+ <li class="odd ">
384
+ <div class="item">
385
+ <span class='object_link'><a href="Chess/CGame.html#resign-instance_method" title="Chess::CGame#resign (method)">#resign</a></span>
386
+ <small>Chess::CGame</small>
387
+ </div>
388
+ </li>
389
+
390
+
391
+ <li class="even ">
392
+ <div class="item">
393
+ <span class='object_link'><a href="Chess/Pgn.html#result-instance_method" title="Chess::Pgn#result (method)">#result</a></span>
394
+ <small>Chess::Pgn</small>
395
+ </div>
396
+ </li>
397
+
398
+
399
+ <li class="odd ">
400
+ <div class="item">
401
+ <span class='object_link'><a href="Chess/CGame.html#result-instance_method" title="Chess::CGame#result (method)">#result</a></span>
402
+ <small>Chess::CGame</small>
403
+ </div>
404
+ </li>
405
+
406
+
407
+ <li class="even ">
408
+ <div class="item">
409
+ <span class='object_link'><a href="Chess/CGame.html#rollback!-instance_method" title="Chess::CGame#rollback! (method)">#rollback!</a></span>
410
+ <small>Chess::CGame</small>
411
+ </div>
412
+ </li>
413
+
414
+
415
+ <li class="odd ">
416
+ <div class="item">
417
+ <span class='object_link'><a href="Chess/Pgn.html#round-instance_method" title="Chess::Pgn#round (method)">#round</a></span>
418
+ <small>Chess::Pgn</small>
419
+ </div>
420
+ </li>
421
+
422
+
423
+ <li class="even ">
424
+ <div class="item">
425
+ <span class='object_link'><a href="Chess/CGame.html#set_fen!-instance_method" title="Chess::CGame#set_fen! (method)">#set_fen!</a></span>
426
+ <small>Chess::CGame</small>
427
+ </div>
428
+ </li>
429
+
430
+
431
+ <li class="odd ">
432
+ <div class="item">
433
+ <span class='object_link'><a href="Chess/Pgn.html#site-instance_method" title="Chess::Pgn#site (method)">#site</a></span>
434
+ <small>Chess::Pgn</small>
435
+ </div>
436
+ </li>
437
+
438
+
439
+ <li class="even ">
440
+ <div class="item">
441
+ <span class='object_link'><a href="Chess/CGame.html#size-instance_method" title="Chess::CGame#size (method)">#size</a></span>
442
+ <small>Chess::CGame</small>
443
+ </div>
444
+ </li>
445
+
446
+
447
+ <li class="odd ">
448
+ <div class="item">
449
+ <span class='object_link'><a href="Chess/Board.html#stalemate%3F-instance_method" title="Chess::Board#stalemate? (method)">#stalemate?</a></span>
450
+ <small>Chess::Board</small>
451
+ </div>
452
+ </li>
453
+
454
+
455
+ <li class="even ">
456
+ <div class="item">
457
+ <span class='object_link'><a href="Chess/Game.html#status-instance_method" title="Chess::Game#status (method)">#status</a></span>
458
+ <small>Chess::Game</small>
459
+ </div>
460
+ </li>
461
+
462
+
463
+ <li class="odd ">
464
+ <div class="item">
465
+ <span class='object_link'><a href="Chess/CGame.html#threefold_repetition%3F-instance_method" title="Chess::CGame#threefold_repetition? (method)">#threefold_repetition?</a></span>
466
+ <small>Chess::CGame</small>
467
+ </div>
468
+ </li>
469
+
470
+
471
+ <li class="even ">
472
+ <div class="item">
473
+ <span class='object_link'><a href="Chess/Board.html#to_fen-instance_method" title="Chess::Board#to_fen (method)">#to_fen</a></span>
474
+ <small>Chess::Board</small>
475
+ </div>
476
+ </li>
477
+
478
+
479
+ <li class="odd ">
480
+ <div class="item">
481
+ <span class='object_link'><a href="Chess/Board.html#to_s-instance_method" title="Chess::Board#to_s (method)">#to_s</a></span>
482
+ <small>Chess::Board</small>
483
+ </div>
484
+ </li>
485
+
486
+
487
+ <li class="even ">
488
+ <div class="item">
489
+ <span class='object_link'><a href="Chess/CGame.html#to_s-instance_method" title="Chess::CGame#to_s (method)">#to_s</a></span>
490
+ <small>Chess::CGame</small>
491
+ </div>
492
+ </li>
493
+
494
+
495
+ <li class="odd ">
496
+ <div class="item">
497
+ <span class='object_link'><a href="Chess/Pgn.html#to_s-instance_method" title="Chess::Pgn#to_s (method)">#to_s</a></span>
498
+ <small>Chess::Pgn</small>
499
+ </div>
500
+ </li>
501
+
502
+
503
+ <li class="even ">
504
+ <div class="item">
505
+ <span class='object_link'><a href="Chess/UTF8Notation.html#to_utf8-instance_method" title="Chess::UTF8Notation#to_utf8 (method)">#to_utf8</a></span>
506
+ <small>Chess::UTF8Notation</small>
507
+ </div>
508
+ </li>
509
+
510
+
511
+ <li class="odd ">
512
+ <div class="item">
513
+ <span class='object_link'><a href="Chess/Pgn.html#white-instance_method" title="Chess::Pgn#white (method)">#white</a></span>
514
+ <small>Chess::Pgn</small>
515
+ </div>
516
+ </li>
517
+
518
+
519
+ <li class="even ">
520
+ <div class="item">
521
+ <span class='object_link'><a href="Chess/Pgn.html#write-instance_method" title="Chess::Pgn#write (method)">#write</a></span>
522
+ <small>Chess::Pgn</small>
523
+ </div>
524
+ </li>
525
+
526
+
527
+
528
+ </ul>
529
+ </div>
530
+ </body>
531
+ </html>
@@ -0,0 +1,110 @@
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
+ Top Level Namespace
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 = "";
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</a> &raquo;
40
+
41
+
42
+ <span class="title">Top Level Namespace</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>Top Level Namespace
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ </div>
80
+
81
+ <h2>Defined Under Namespace</h2>
82
+ <p class="children">
83
+
84
+
85
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Chess.html" title="Chess (module)">Chess</a></span>
86
+
87
+
88
+
89
+
90
+ </p>
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ </div>
101
+
102
+ <div id="footer">
103
+ Generated on Thu Jan 28 17:31:40 2021 by
104
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
+ 0.9.26 (ruby-2.6.1).
106
+ </div>
107
+
108
+ </div>
109
+ </body>
110
+ </html>
data/ext/chess.c CHANGED
@@ -723,7 +723,7 @@ Init_chess ()
723
723
  rb_define_method (board_klass, "stalemate?", board_stalemate, 0);
724
724
  rb_define_method (board_klass, "insufficient_material?", board_insufficient_material, 0);
725
725
  rb_define_method (board_klass, "only_kings?", board_only_kings, 0);
726
- rb_define_method (board_klass, "fifty_rule_move?", board_fifty_move_rule, 0);
726
+ rb_define_method (board_klass, "fifty_move_rule?", board_fifty_move_rule, 0);
727
727
  rb_define_method (board_klass, "active_color", board_active_color, 0);
728
728
  rb_define_method (board_klass, "halfmove_clock", board_halfmove_clock, 0);
729
729
  rb_define_method (board_klass, "fullmove_number", board_fullmove_number, 0);
data/ext/common.h CHANGED
@@ -13,9 +13,15 @@
13
13
  #include <string.h>
14
14
  #include <ctype.h>
15
15
 
16
- // Macros
16
+ // Boolean definition
17
+
18
+ #ifndef RUBY_BACKWARD2_BOOL_H
17
19
  #define FALSE 0
18
20
  #define TRUE 1
21
+ typedef unsigned short bool;
22
+ #endif
23
+
24
+ // Macros
19
25
 
20
26
  #define A1 0
21
27
  #define B1 1
@@ -95,8 +101,6 @@
95
101
  #define DRAW 2
96
102
  #define IN_PROGRESS 3
97
103
 
98
- typedef unsigned short bool;
99
-
100
104
  char square_to_file (int square);
101
105
  char square_to_rank (int square);
102
106
  int coord_to_square (const char *coord);
data/ext/extconf.rb CHANGED
@@ -1,4 +1,4 @@
1
- ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/
1
+ ENV['RC_ARCHS'] = '' if RUBY_PLATFORM.include?('darwin')
2
2
 
3
3
  require 'mkmf'
4
4