chess 0.1.2 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94e7a4ac7ec5ae63ad5987a9fb74e1dbc5cb7800
4
- data.tar.gz: bd70ea660bd6c47e95da157e5ea2a6024465f3ba
3
+ metadata.gz: b1b122a9e2e4ddaf1384bb4436f27d657c0691fd
4
+ data.tar.gz: 806cded3d3289d7766774e898315634698bd94e4
5
5
  SHA512:
6
- metadata.gz: e097138279b50d5465e58c47cc2ca5b1967c1872c3db54811efd8a3267874996c68eb87637b6cc1842ac5af94f027c2ca016b9865541ca06880255ed3db432ea
7
- data.tar.gz: b14cb7c634fb759d2d485f653915a311c98aa756494c2f6fb5fa072879e0a641151b4c2e090e91222ce1fb18eac490f0f5d7e4bf33fc13683559336312b5caee
6
+ metadata.gz: 8613eb5ba2e25085ac2988f8184e4ad2b961e26846c1bc62aade2a7d1bc28162a904c921ce3b6d46f52a03a4b9fc5cc12cc7d01edc0fb75ab11eb68c7ef9aa48
7
+ data.tar.gz: 0e57bca085a33d11f4ebc0690cfa04da76472cb432b2b96a35d01c27c65e035794f154c8c317a3632e239c0622827a52410f938f036def5ff6a0096adaf792b7
data/chess.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = 'chess'
7
7
  s.version = Chess::VERSION
8
8
  s.authors = ['Enrico Pilotto']
9
- s.email = ['enrico@megiston.it']
9
+ s.email = ['epilotto@gmx.com']
10
10
  s.homepage = 'https://github.com/pioz/chess'
11
11
  s.summary = %q{A fast chess library to play chess with Ruby.}
12
12
  s.description = %q{A fast chess library that use bitboards to play chess with Ruby.}
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.extensions = ['ext/extconf.rb']
21
21
  s.require_paths = ['lib']
22
22
 
23
+ s.required_ruby_version = '>= 1.9'
23
24
  s.add_development_dependency 'bundler', '~> 1.14'
24
25
  s.add_development_dependency 'rake', '~> 12.0'
25
26
  s.add_development_dependency 'minitest', '~> 5.10'
data/doc/Chess/Board.html CHANGED
@@ -151,7 +151,7 @@ calculations. This ensures a fast library.</p>
151
151
  <div class="method-description">
152
152
 
153
153
  <p>Returns the piece on the <code>square</code> of the chessboard. If there is
154
- no piece or the square is not valid return the blank string.</p>
154
+ no piece or the square is not valid return <code>nil</code>.</p>
155
155
 
156
156
  <p>Each square on the chessboard is represented by an integer according to the
157
157
  following scheme:</p>
@@ -170,10 +170,9 @@ following scheme:</p>
170
170
  <p>Parameters are:</p>
171
171
  <dl class="rdoc-list note-list"><dt><code>square</code>
172
172
  <dd>
173
- <p>the square of the board. Can be a fixnum between 0 and 63 or a</p>
173
+ <p>the square of the board. Can be an integer between 0 and 63 or a string
174
+ like &#39;a2&#39;, &#39;c5&#39;…</p>
174
175
  </dd></dl>
175
-
176
- <p>string like &#39;a2&#39;, &#39;c5&#39;… The string must be downcase.</p>
177
176
 
178
177
 
179
178
 
@@ -190,7 +189,10 @@ board_get_piece (VALUE self, VALUE square)
190
189
  else
191
190
  i = FIX2INT (square);
192
191
  char piece = board-&gt;placement[i];
193
- return rb_str_new (&amp;piece, 1);
192
+ if (i &lt; 0 || i &gt; 63 || !piece)
193
+ return Qnil;
194
+ else
195
+ return rb_str_new (&amp;piece, 1);
194
196
  }</pre>
195
197
  </div>
196
198
 
data/doc/created.rid CHANGED
@@ -1,15 +1,15 @@
1
- Thu, 20 Jul 2017 15:24:00 +0200
2
- README.rdoc Thu, 20 Jul 2017 14:48:45 +0200
3
- lib/chess.rb Thu, 20 Jul 2017 14:48:45 +0200
4
- lib/chess/exceptions.rb Thu, 20 Jul 2017 14:48:45 +0200
5
- lib/chess/game.rb Thu, 20 Jul 2017 14:48:45 +0200
6
- lib/chess/gnuchess.rb Thu, 20 Jul 2017 14:48:45 +0200
7
- lib/chess/pgn.rb Thu, 20 Jul 2017 14:48:45 +0200
8
- lib/chess/utf8_notation.rb Thu, 20 Jul 2017 14:48:45 +0200
9
- lib/chess/version.rb Thu, 20 Jul 2017 14:48:45 +0200
10
- ext/bitboard.c Thu, 20 Jul 2017 15:18:42 +0200
11
- ext/board.c Thu, 20 Jul 2017 15:21:27 +0200
12
- ext/chess.c Thu, 20 Jul 2017 15:14:18 +0200
13
- ext/common.c Thu, 20 Jul 2017 14:48:45 +0200
14
- ext/game.c Thu, 20 Jul 2017 15:22:45 +0200
15
- ext/special.c Thu, 20 Jul 2017 14:48:45 +0200
1
+ Tue, 01 Aug 2017 23:53:08 +0200
2
+ README.rdoc Tue, 01 Aug 2017 23:51:18 +0200
3
+ lib/chess.rb Tue, 01 Aug 2017 23:51:18 +0200
4
+ lib/chess/exceptions.rb Tue, 01 Aug 2017 23:51:18 +0200
5
+ lib/chess/game.rb Tue, 01 Aug 2017 23:51:18 +0200
6
+ lib/chess/gnuchess.rb Tue, 01 Aug 2017 23:51:18 +0200
7
+ lib/chess/pgn.rb Tue, 01 Aug 2017 23:51:18 +0200
8
+ lib/chess/utf8_notation.rb Tue, 01 Aug 2017 23:51:18 +0200
9
+ lib/chess/version.rb Tue, 01 Aug 2017 23:51:18 +0200
10
+ ext/bitboard.c Tue, 01 Aug 2017 23:51:18 +0200
11
+ ext/board.c Tue, 01 Aug 2017 23:51:18 +0200
12
+ ext/chess.c Tue, 01 Aug 2017 23:52:43 +0200
13
+ ext/common.c Tue, 01 Aug 2017 23:51:18 +0200
14
+ ext/game.c Tue, 01 Aug 2017 23:51:18 +0200
15
+ ext/special.c Tue, 01 Aug 2017 23:51:18 +0200
Binary file
Binary file
Binary file
data/ext/bitboard.c CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/bitboard.h CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/board.c CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/board.h CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/chess.c CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
@@ -439,8 +439,8 @@ board_placement (VALUE self)
439
439
  * a b c d e f g h
440
440
  *
441
441
  * Parameters are:
442
- * +square+:: the square of the board. Can be a fixnum between 0 and 63 or a
443
- * string like 'a2', 'c5'...
442
+ * +square+:: the square of the board. Can be an integer between 0 and 63 or a
443
+ * string like 'a2', 'c5'...
444
444
  */
445
445
  VALUE
446
446
  board_get_piece (VALUE self, VALUE square)
data/ext/chess.h CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/common.c CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/common.h CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/game.c CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/game.h CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/special.c CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/ext/special.h CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * chess - a fast library to play chess in Ruby
3
3
  *
4
- * Copyright (c) 2011-2012, Enrico Pilotto <enrico@megiston.it>
4
+ * Copyright (c) 2011-2017, Enrico Pilotto <epilotto@gmx.com>
5
5
  * This code is under LICENSE LGPLv3
6
6
  */
7
7
 
data/lib/chess/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # The Chess library module.
2
2
  module Chess
3
3
  # The library version.
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrico Pilotto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '5.1'
69
69
  description: A fast chess library that use bitboards to play chess with Ruby.
70
70
  email:
71
- - enrico@megiston.it
71
+ - epilotto@gmx.com
72
72
  executables: []
73
73
  extensions:
74
74
  - ext/extconf.rb
@@ -1377,7 +1377,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1377
1377
  requirements:
1378
1378
  - - ">="
1379
1379
  - !ruby/object:Gem::Version
1380
- version: '0'
1380
+ version: '1.9'
1381
1381
  required_rubygems_version: !ruby/object:Gem::Requirement
1382
1382
  requirements:
1383
1383
  - - ">="