chess 0.3.3 → 0.3.4
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 +4 -4
- data/.github/workflows/ruby.yml +3 -3
- data/.gitignore +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +2 -2
- data/chess.gemspec +2 -3
- data/ext/chess/chess.bundle +0 -0
- data/ext/{chess.c → chess/chess.c} +1 -0
- data/lib/chess/game.rb +0 -2
- data/lib/chess/version.rb +1 -1
- data/lib/chess.rb +13 -5
- metadata +19 -18
- /data/ext/{MakefileC → chess/MakefileC} +0 -0
- /data/ext/{bitboard.c → chess/bitboard.c} +0 -0
- /data/ext/{bitboard.h → chess/bitboard.h} +0 -0
- /data/ext/{board.c → chess/board.c} +0 -0
- /data/ext/{board.h → chess/board.h} +0 -0
- /data/ext/{chess.h → chess/chess.h} +0 -0
- /data/ext/{common.c → chess/common.c} +0 -0
- /data/ext/{common.h → chess/common.h} +0 -0
- /data/ext/{extconf.rb → chess/extconf.rb} +0 -0
- /data/ext/{game.c → chess/game.c} +0 -0
- /data/ext/{game.h → chess/game.h} +0 -0
- /data/ext/{special.c → chess/special.c} +0 -0
- /data/ext/{special.h → chess/special.h} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36668063cb71d331dbb172611791d43e0b5d465c0cd9e87baf80bc35cf11e551
|
4
|
+
data.tar.gz: 516ebc6fb472885ec871c6fbd955f489a6afec26c52250a9612210e61f6ce883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3e811ed0ac4ad177ef1991cd38bbabf84b2139a8d12ea18b0f251621ed744cc54afe9252b489874a6f121551899a5382cffff67158281ca6ce64b5fe0ce2b61
|
7
|
+
data.tar.gz: cad20b859cc7c41b4dfba6b92e0de8bc14317b86f0e4ffeb9f656819a2f507160534eeca6c0944a251964bf2d8ec20fc199548c50d293cf4f7a1c6b64797ae3c
|
data/.github/workflows/ruby.yml
CHANGED
@@ -18,7 +18,7 @@ jobs:
|
|
18
18
|
runs-on: ubuntu-latest
|
19
19
|
strategy:
|
20
20
|
matrix:
|
21
|
-
ruby-version: ['2.6', '2.7', '3.0', '3.1']
|
21
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
|
22
22
|
|
23
23
|
steps:
|
24
24
|
- uses: actions/checkout@v2
|
@@ -28,7 +28,7 @@ jobs:
|
|
28
28
|
ruby-version: ${{ matrix.ruby-version }}
|
29
29
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
30
30
|
- name: Compile extension
|
31
|
-
working-directory: ./ext
|
31
|
+
working-directory: ./ext/chess
|
32
32
|
run: |
|
33
33
|
ruby extconf.rb
|
34
34
|
make
|
@@ -45,7 +45,7 @@ jobs:
|
|
45
45
|
runs-on: ubuntu-latest
|
46
46
|
strategy:
|
47
47
|
matrix:
|
48
|
-
ruby-version: ['2.6', '2.7', '3.0', '3.1']
|
48
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
|
49
49
|
|
50
50
|
steps:
|
51
51
|
- uses: actions/checkout@v2
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'bundler/gem_tasks'
|
|
2
2
|
|
3
3
|
require 'yard'
|
4
4
|
YARD::Rake::YardocTask.new do |t|
|
5
|
-
t.files = ['lib/**/*.rb', 'ext
|
5
|
+
t.files = ['lib/**/*.rb', 'ext/**/*.c']
|
6
6
|
t.options << '-rREADME.md'
|
7
7
|
t.options << '--title=Chess'
|
8
8
|
t.options << '-mmarkdown'
|
@@ -12,7 +12,7 @@ end
|
|
12
12
|
require 'rake/testtask'
|
13
13
|
task default: :test
|
14
14
|
Rake::TestTask.new do |test|
|
15
|
-
test.libs
|
15
|
+
test.libs += %w[ext lib test]
|
16
16
|
test.warning = true
|
17
17
|
test.test_files = FileList["test/test_#{ENV.fetch('T', '*')}.rb"]
|
18
18
|
end
|
data/chess.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
require 'chess/version'
|
1
|
+
require_relative 'lib/chess/version'
|
3
2
|
|
4
3
|
Gem::Specification.new do |s|
|
5
4
|
s.name = 'chess'
|
@@ -13,7 +12,7 @@ Gem::Specification.new do |s|
|
|
13
12
|
|
14
13
|
s.files = `git ls-files`.split("\n")
|
15
14
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
16
|
-
s.extensions = ['ext/extconf.rb']
|
15
|
+
s.extensions = ['ext/chess/extconf.rb']
|
17
16
|
s.require_paths = ['lib']
|
18
17
|
|
19
18
|
s.metadata['rubygems_mfa_required'] = 'true'
|
Binary file
|
@@ -716,6 +716,7 @@ Init_chess ()
|
|
716
716
|
* This ensures a fast library.
|
717
717
|
*/
|
718
718
|
board_klass = rb_define_class_under (chess, "Board", rb_cObject);
|
719
|
+
rb_undef_alloc_func (board_klass);
|
719
720
|
rb_define_method (board_klass, "placement", board_placement, 0);
|
720
721
|
rb_define_method (board_klass, "[]", board_get_piece, 1);
|
721
722
|
rb_define_method (board_klass, "check?", board_king_in_check, 0);
|
data/lib/chess/game.rb
CHANGED
data/lib/chess/version.rb
CHANGED
data/lib/chess.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
require 'chess/
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
require 'chess/chess' # this is the compiled ruby extension (chess.so or chess.bundle)
|
2
|
+
require_relative 'chess/exceptions'
|
3
|
+
require_relative 'chess/game'
|
4
|
+
require_relative 'chess/gnuchess'
|
5
|
+
require_relative 'chess/pgn'
|
6
|
+
require_relative 'chess/version'
|
7
|
+
|
8
|
+
# While development to require 'chess' from irb run with `irb -I lib:ext`
|
9
|
+
# $ irb -I lib:ext
|
10
|
+
# irb(main):001:0> require 'chess'
|
11
|
+
# => true
|
12
|
+
# irb(main):002:0> Chess::Game.new
|
13
|
+
# => #<Chess::Game:0x0000000000000001>
|
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.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enrico Pilotto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -169,7 +169,7 @@ email:
|
|
169
169
|
- epilotto@gmx.com
|
170
170
|
executables: []
|
171
171
|
extensions:
|
172
|
-
- ext/extconf.rb
|
172
|
+
- ext/chess/extconf.rb
|
173
173
|
extra_rdoc_files: []
|
174
174
|
files:
|
175
175
|
- ".github/FUNDING.yml"
|
@@ -207,20 +207,21 @@ files:
|
|
207
207
|
- docs/js/jquery.js
|
208
208
|
- docs/method_list.html
|
209
209
|
- docs/top-level-namespace.html
|
210
|
-
- ext/MakefileC
|
211
|
-
- ext/bitboard.c
|
212
|
-
- ext/bitboard.h
|
213
|
-
- ext/board.c
|
214
|
-
- ext/board.h
|
215
|
-
- ext/chess.
|
216
|
-
- ext/chess.
|
217
|
-
- ext/
|
218
|
-
- ext/common.
|
219
|
-
- ext/
|
220
|
-
- ext/
|
221
|
-
- ext/game.
|
222
|
-
- ext/
|
223
|
-
- ext/special.
|
210
|
+
- ext/chess/MakefileC
|
211
|
+
- ext/chess/bitboard.c
|
212
|
+
- ext/chess/bitboard.h
|
213
|
+
- ext/chess/board.c
|
214
|
+
- ext/chess/board.h
|
215
|
+
- ext/chess/chess.bundle
|
216
|
+
- ext/chess/chess.c
|
217
|
+
- ext/chess/chess.h
|
218
|
+
- ext/chess/common.c
|
219
|
+
- ext/chess/common.h
|
220
|
+
- ext/chess/extconf.rb
|
221
|
+
- ext/chess/game.c
|
222
|
+
- ext/chess/game.h
|
223
|
+
- ext/chess/special.c
|
224
|
+
- ext/chess/special.h
|
224
225
|
- lib/chess.rb
|
225
226
|
- lib/chess/exceptions.rb
|
226
227
|
- lib/chess/game.rb
|
@@ -1471,7 +1472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1471
1472
|
- !ruby/object:Gem::Version
|
1472
1473
|
version: '0'
|
1473
1474
|
requirements: []
|
1474
|
-
rubygems_version: 3.
|
1475
|
+
rubygems_version: 3.4.7
|
1475
1476
|
signing_key:
|
1476
1477
|
specification_version: 4
|
1477
1478
|
summary: A fast chess library to play chess with Ruby.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|