chess 0.1.0 → 0.1.1

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +1 -1
  3. data/Rakefile +3 -4
  4. data/chess.gemspec +5 -0
  5. data/doc/Chess.html +112 -0
  6. data/doc/Chess/BadNotationError.html +107 -0
  7. data/doc/Chess/Board.html +703 -0
  8. data/doc/Chess/CGame.html +1005 -0
  9. data/doc/Chess/Game.html +684 -0
  10. data/doc/Chess/Gnuchess.html +215 -0
  11. data/doc/Chess/IllegalMoveError.html +105 -0
  12. data/doc/Chess/InvalidFenFormatError.html +105 -0
  13. data/doc/Chess/InvalidPgnFormatError.html +105 -0
  14. data/doc/Chess/Pgn.html +309 -0
  15. data/doc/Chess/UTF8Notation.html +174 -0
  16. data/doc/README_rdoc.html +143 -0
  17. data/doc/created.rid +15 -15
  18. data/doc/css/fonts.css +167 -0
  19. data/doc/css/rdoc.css +590 -0
  20. data/doc/fonts/Lato-Light.ttf +0 -0
  21. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  22. data/doc/fonts/Lato-Regular.ttf +0 -0
  23. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  24. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  25. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  26. data/doc/images/add.png +0 -0
  27. data/doc/images/arrow_up.png +0 -0
  28. data/doc/images/brick.png +0 -0
  29. data/doc/images/brick_link.png +0 -0
  30. data/doc/images/bug.png +0 -0
  31. data/doc/images/bullet_black.png +0 -0
  32. data/doc/images/bullet_toggle_minus.png +0 -0
  33. data/doc/images/bullet_toggle_plus.png +0 -0
  34. data/doc/images/date.png +0 -0
  35. data/doc/images/delete.png +0 -0
  36. data/doc/images/find.png +0 -0
  37. data/doc/images/loadingAnimation.gif +0 -0
  38. data/doc/images/macFFBgHack.png +0 -0
  39. data/doc/images/package.png +0 -0
  40. data/doc/images/page_green.png +0 -0
  41. data/doc/images/page_white_text.png +0 -0
  42. data/doc/images/page_white_width.png +0 -0
  43. data/doc/images/plugin.png +0 -0
  44. data/doc/images/ruby.png +0 -0
  45. data/doc/images/tag_blue.png +0 -0
  46. data/doc/images/tag_green.png +0 -0
  47. data/doc/images/transparent.png +0 -0
  48. data/doc/images/wrench.png +0 -0
  49. data/doc/images/wrench_orange.png +0 -0
  50. data/doc/images/zoom.png +0 -0
  51. data/doc/index.html +159 -12
  52. data/doc/js/darkfish.js +161 -0
  53. data/doc/js/jquery.js +4 -0
  54. data/doc/js/navigation.js.gz +0 -0
  55. data/doc/js/search.js +109 -0
  56. data/doc/js/search_index.js +1 -1
  57. data/doc/js/search_index.js.gz +0 -0
  58. data/doc/js/searcher.js +1 -0
  59. data/doc/js/searcher.js.gz +0 -0
  60. data/doc/table_of_contents.html +331 -0
  61. data/ext/chess.c +5 -2
  62. data/ext/game.c +1 -1
  63. data/ext/game.h +1 -1
  64. data/lib/chess/game.rb +1 -1
  65. data/lib/chess/pgn.rb +5 -1
  66. data/lib/chess/version.rb +1 -1
  67. metadata +112 -46
  68. data/doc/apple-touch-icon.png +0 -0
  69. data/doc/classes/Chess.html +0 -162
  70. data/doc/classes/Chess/BadNotationError.html +0 -84
  71. data/doc/classes/Chess/Board.html +0 -795
  72. data/doc/classes/Chess/CGame.html +0 -1168
  73. data/doc/classes/Chess/Game.html +0 -775
  74. data/doc/classes/Chess/Gnuchess.html +0 -206
  75. data/doc/classes/Chess/IllegalMoveError.html +0 -82
  76. data/doc/classes/Chess/InvalidFenFormatError.html +0 -82
  77. data/doc/classes/Chess/InvalidPgnFormatError.html +0 -82
  78. data/doc/classes/Chess/Pgn.html +0 -332
  79. data/doc/classes/Chess/UTF8Notation.html +0 -175
  80. data/doc/css/github.css +0 -123
  81. data/doc/css/main.css +0 -323
  82. data/doc/css/panel.css +0 -384
  83. data/doc/css/reset.css +0 -48
  84. data/doc/favicon.ico +0 -0
  85. data/doc/files/README_rdoc.html +0 -122
  86. data/doc/files/ext/bitboard_c.html +0 -68
  87. data/doc/files/ext/board_c.html +0 -68
  88. data/doc/files/ext/chess_c.html +0 -68
  89. data/doc/files/ext/common_c.html +0 -68
  90. data/doc/files/ext/game_c.html +0 -68
  91. data/doc/files/ext/special_c.html +0 -68
  92. data/doc/files/lib/chess/exceptions_rb.html +0 -94
  93. data/doc/files/lib/chess/game_rb.html +0 -84
  94. data/doc/files/lib/chess/gnuchess_rb.html +0 -84
  95. data/doc/files/lib/chess/pgn_rb.html +0 -84
  96. data/doc/files/lib/chess/utf8_notation_rb.html +0 -84
  97. data/doc/files/lib/chess/version_rb.html +0 -85
  98. data/doc/files/lib/chess_rb.html +0 -84
  99. data/doc/i/arrows.png +0 -0
  100. data/doc/i/results_bg.png +0 -0
  101. data/doc/i/tree_bg.png +0 -0
  102. data/doc/js/highlight.pack.js +0 -1
  103. data/doc/js/jquery-1.3.2.min.js +0 -19
  104. data/doc/js/jquery-effect.js +0 -593
  105. data/doc/js/main.js +0 -24
  106. data/doc/js/searchdoc.js +0 -449
  107. data/doc/panel/index.html +0 -73
  108. data/doc/panel/links.html +0 -34
  109. data/doc/panel/tree.js +0 -1
@@ -1,206 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Chess::Gnuchess</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
11
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
15
-
16
- </head>
17
-
18
- <body>
19
- <div class="banner">
20
-
21
- <h1>
22
- <span class="type">Module</span>
23
- Chess::Gnuchess
24
-
25
- </h1>
26
- <ul class="files">
27
-
28
- <li><a href="../../files/lib/chess/gnuchess_rb.html">lib/chess/gnuchess.rb</a></li>
29
-
30
- </ul>
31
- </div>
32
- <div id="bodyContent">
33
- <div id="content">
34
-
35
- <div class="description">
36
-
37
- <p>Use <a href="Gnuchess.html">Gnuchess</a> to I.A. <em>(Only a draft)</em> To
38
- use this module, extend a game object with <a
39
- href="Gnuchess.html">Chess::Gnuchess</a>. <a
40
- href="Gnuchess.html">Gnuchess</a> binary have to be installed.</p>
41
-
42
- <pre><code>g = Chess::Game.new
43
- g.extend Chess::Gnuchess
44
- g.gnuchess_move!
45
- puts g
46
- </code></pre>
47
-
48
- </div>
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
- <!-- Method ref -->
64
- <div class="sectiontitle">Methods</div>
65
- <dl class="methods">
66
-
67
- <dt>G</dt>
68
- <dd>
69
- <ul>
70
-
71
-
72
- <li>
73
- <a href="#method-i-gnuchess_move">gnuchess_move</a>,
74
- </li>
75
-
76
-
77
- <li>
78
- <a href="#method-i-gnuchess_move-21">gnuchess_move!</a>
79
- </li>
80
-
81
- </ul>
82
- </dd>
83
-
84
- </dl>
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
- <!-- Methods -->
104
-
105
- <div class="sectiontitle">Instance Public methods</div>
106
-
107
- <div class="method">
108
- <div class="title method-title" id="method-i-gnuchess_move">
109
-
110
- <b>gnuchess_move</b>()
111
-
112
- <a href="../../classes/Chess/Gnuchess.html#method-i-gnuchess_move" name="method-i-gnuchess_move" class="permalink">Link</a>
113
- </div>
114
-
115
-
116
- <div class="description">
117
- <p>Return the next move calculated by <a href="Gnuchess.html">Gnuchess</a>. <a
118
- href="Gnuchess.html">Gnuchess</a> must be installed!</p>
119
- </div>
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
- <div class="sourcecode">
129
-
130
- <p class="source-link">
131
- Source:
132
- <a href="javascript:toggleSource('method-i-gnuchess_move_source')" id="l_method-i-gnuchess_move_source">show</a>
133
-
134
- </p>
135
- <div id="method-i-gnuchess_move_source" class="dyn-source">
136
- <pre><span class="ruby-comment"># File lib/chess/gnuchess.rb, line 15</span>
137
- <span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gnuchess_move</span>
138
- <span class="ruby-identifier">pipe</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">popen</span>(<span class="ruby-string">&#39;gnuchess -x&#39;</span>, <span class="ruby-string">&#39;r+&#39;</span>)
139
- <span class="ruby-keyword">begin</span>
140
- <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-string">&#39;depth 1&#39;</span>)
141
- <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-string">&#39;manual&#39;</span>)
142
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">coord_moves</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
143
- <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-identifier">m</span>)
144
- <span class="ruby-keyword">end</span>
145
- <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-string">&#39;go&#39;</span>)
146
- <span class="ruby-keyword">while</span> <span class="ruby-identifier">line</span> = <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">gets</span>
147
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">IllegalMoveError</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-string">&#39;Invalid move&#39;</span>)
148
- <span class="ruby-identifier">match</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/My move is : ([a-h][1-8][a-h][1-8][rkbq]?)/</span>)
149
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">match</span>[<span class="ruby-number">1</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">match</span>
150
- <span class="ruby-keyword">end</span>
151
- <span class="ruby-keyword">ensure</span>
152
- <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-string">&#39;quit&#39;</span>)
153
- <span class="ruby-identifier">pipe</span>.<span class="ruby-identifier">close</span>
154
- <span class="ruby-keyword">end</span>
155
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">moves</span>
156
- <span class="ruby-keyword">end</span></pre>
157
- </div>
158
- </div>
159
-
160
- </div>
161
-
162
- <div class="method">
163
- <div class="title method-title" id="method-i-gnuchess_move-21">
164
-
165
- <b>gnuchess_move!</b>()
166
-
167
- <a href="../../classes/Chess/Gnuchess.html#method-i-gnuchess_move-21" name="method-i-gnuchess_move-21" class="permalink">Link</a>
168
- </div>
169
-
170
-
171
- <div class="description">
172
- <p>Make a move using <a href="Gnuchess.html">Gnuchess</a> engine. This add a
173
- new <a href="Board.html">Board</a> in the <a href="Game.html">Game</a>.
174
- Return the next move calculated by <a href="Gnuchess.html">Gnuchess</a>. <a
175
- href="Gnuchess.html">Gnuchess</a> must be installed!</p>
176
- </div>
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
- <div class="sourcecode">
186
-
187
- <p class="source-link">
188
- Source:
189
- <a href="javascript:toggleSource('method-i-gnuchess_move-21_source')" id="l_method-i-gnuchess_move-21_source">show</a>
190
-
191
- </p>
192
- <div id="method-i-gnuchess_move-21_source" class="dyn-source">
193
- <pre><span class="ruby-comment"># File lib/chess/gnuchess.rb, line 39</span>
194
- <span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gnuchess_move!</span>
195
- <span class="ruby-identifier">next_move</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">gnuchess_move</span>
196
- <span class="ruby-keyword">self</span>.<span class="ruby-identifier">move</span>(<span class="ruby-identifier">next_move</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">next_move</span>
197
- <span class="ruby-keyword">end</span></pre>
198
- </div>
199
- </div>
200
-
201
- </div>
202
- </div>
203
-
204
- </div>
205
- </body>
206
- </html>
@@ -1,82 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Chess::IllegalMoveError</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
11
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
15
-
16
- </head>
17
-
18
- <body>
19
- <div class="banner">
20
-
21
- <h1>
22
- <span class="type">Class</span>
23
- Chess::IllegalMoveError
24
-
25
- <span class="parent">&lt;
26
-
27
- StandardError
28
-
29
- </span>
30
-
31
- </h1>
32
- <ul class="files">
33
-
34
- <li><a href="../../files/ext/chess_c.html">ext/chess.c</a></li>
35
-
36
- </ul>
37
- </div>
38
- <div id="bodyContent">
39
- <div id="content">
40
-
41
- <div class="description">
42
-
43
- <p>This exception will be raised when making an illegal move.</p>
44
-
45
- </div>
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
- <!-- Methods -->
78
- </div>
79
-
80
- </div>
81
- </body>
82
- </html>
@@ -1,82 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Chess::InvalidFenFormatError</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
11
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
15
-
16
- </head>
17
-
18
- <body>
19
- <div class="banner">
20
-
21
- <h1>
22
- <span class="type">Class</span>
23
- Chess::InvalidFenFormatError
24
-
25
- <span class="parent">&lt;
26
-
27
- StandardError
28
-
29
- </span>
30
-
31
- </h1>
32
- <ul class="files">
33
-
34
- <li><a href="../../files/lib/chess/exceptions_rb.html">lib/chess/exceptions.rb</a></li>
35
-
36
- </ul>
37
- </div>
38
- <div id="bodyContent">
39
- <div id="content">
40
-
41
- <div class="description">
42
-
43
- <p>This exception will be raised when an invalid FEN string is used.</p>
44
-
45
- </div>
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
- <!-- Methods -->
78
- </div>
79
-
80
- </div>
81
- </body>
82
- </html>
@@ -1,82 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <title>Chess::InvalidPgnFormatError</title>
7
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
9
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
10
- <link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
11
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
12
- <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
13
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
15
-
16
- </head>
17
-
18
- <body>
19
- <div class="banner">
20
-
21
- <h1>
22
- <span class="type">Class</span>
23
- Chess::InvalidPgnFormatError
24
-
25
- <span class="parent">&lt;
26
-
27
- StandardError
28
-
29
- </span>
30
-
31
- </h1>
32
- <ul class="files">
33
-
34
- <li><a href="../../files/lib/chess/exceptions_rb.html">lib/chess/exceptions.rb</a></li>
35
-
36
- </ul>
37
- </div>
38
- <div id="bodyContent">
39
- <div id="content">
40
-
41
- <div class="description">
42
-
43
- <p>This exception will be raised when a malformed PGN file is loaded.</p>
44
-
45
- </div>
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
- <!-- Methods -->
78
- </div>
79
-
80
- </div>
81
- </body>
82
- </html>