chess 0.3.1 → 0.3.2
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/FUNDING.yml +12 -0
- data/.github/workflows/ruby.yml +58 -0
- data/.gitignore +2 -2
- data/.rubocop.yml +9 -144
- data/Gemfile.lock +70 -0
- data/README.md +26 -22
- data/Rakefile +1 -0
- data/chess.gemspec +8 -5
- data/docs/Chess.html +157 -0
- data/docs/Chess/BadNotationError.html +237 -0
- data/docs/Chess/Board.html +1759 -0
- data/docs/Chess/CGame.html +2296 -0
- data/docs/Chess/Game.html +1277 -0
- data/docs/Chess/Gnuchess.html +366 -0
- data/docs/Chess/IllegalMoveError.html +137 -0
- data/docs/Chess/InvalidFenFormatError.html +237 -0
- data/docs/Chess/InvalidPgnFormatError.html +217 -0
- data/docs/Chess/Pgn.html +1477 -0
- data/docs/Chess/UTF8Notation.html +270 -0
- data/docs/_index.html +217 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.README.html +116 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +116 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +531 -0
- data/docs/top-level-namespace.html +110 -0
- data/ext/chess.c +1 -1
- data/ext/common.h +7 -3
- data/ext/extconf.rb +1 -1
- data/lib/chess/game.rb +53 -67
- data/lib/chess/gnuchess.rb +49 -53
- data/lib/chess/pgn.rb +10 -12
- data/lib/chess/utf8_notation.rb +3 -0
- data/lib/chess/version.rb +1 -1
- data/test/test_big_pgn_collection.rb +1 -1
- data/test/test_checkmate.rb +4 -4
- data/test/test_errors.rb +22 -0
- data/test/test_fifty_rule_move.rb +2 -2
- data/test/test_game.rb +82 -0
- data/test/test_helper.rb +15 -0
- data/test/test_insufficient_material.rb +4 -4
- data/test/test_move_generator.rb +3 -2
- data/test/test_pgn.rb +35 -0
- data/test/test_pgn_collection.rb +2 -2
- data/test/test_stalemate.rb +1 -1
- data/test/test_threefold_repetition.rb +1 -1
- metadata +112 -10
data/lib/chess/utf8_notation.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module Chess
|
2
|
+
# rubocop:disable Style/AsciiComments
|
3
|
+
|
2
4
|
# With this module is possible call the method {#to_utf8} on a string. This
|
3
5
|
# method convert the chess piece identifier character into UTF8 chess
|
4
6
|
# character.
|
@@ -34,6 +36,7 @@ module Chess
|
|
34
36
|
self.gsub(/[PRNBQKprnbqk]/, UTF8_MAP)
|
35
37
|
end
|
36
38
|
end
|
39
|
+
# rubocop:enable Style/AsciiComments
|
37
40
|
end
|
38
41
|
|
39
42
|
String.prepend(Chess::UTF8Notation)
|
data/lib/chess/version.rb
CHANGED
@@ -11,7 +11,7 @@ class ChessTest < Minitest::Test
|
|
11
11
|
define_method "test_big_pgn_#{filename}" do
|
12
12
|
pgn = Chess::Pgn.new(path)
|
13
13
|
game = Chess::Game.new(pgn.moves)
|
14
|
-
assert(game.checkmate?) if pgn.moves.last
|
14
|
+
assert(game.checkmate?) if pgn.moves.last.match?(/\#$/)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/test/test_checkmate.rb
CHANGED
@@ -9,11 +9,11 @@ class ChessTest < Minitest::Test
|
|
9
9
|
game = Chess::Game.new(pgn.moves)
|
10
10
|
assert(game.board.checkmate?)
|
11
11
|
if file.include?('white_won')
|
12
|
-
assert_equal(
|
13
|
-
assert_equal(game.active_player
|
12
|
+
assert_equal('1-0', game.result)
|
13
|
+
assert_equal(:black, game.active_player)
|
14
14
|
elsif file.include?('black_won')
|
15
|
-
assert_equal(
|
16
|
-
assert_equal(game.active_player
|
15
|
+
assert_equal('0-1', game.result)
|
16
|
+
assert_equal(:white, game.active_player)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/test/test_errors.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ChessTest < Minitest::Test
|
4
|
+
def test_bad_notation_error
|
5
|
+
game = Chess::Game.new
|
6
|
+
assert_raises(Chess::BadNotationError) do
|
7
|
+
game << 'gg'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_invalid_pgn_format_error
|
12
|
+
assert_raises(Chess::InvalidPgnFormatError) do
|
13
|
+
Chess::Pgn.new('test/pgn_collection/invalid/0001.pgn')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_invalid_fen_format_error
|
18
|
+
assert_raises(Chess::InvalidFenFormatError) do
|
19
|
+
Chess::Game.load_fen('invalid')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -3,10 +3,10 @@ require 'test_helper'
|
|
3
3
|
class ChessTest < Minitest::Test
|
4
4
|
TestHelper.pgns('fifty_move_rule').each do |file|
|
5
5
|
name = File.basename(file, '.pgn')
|
6
|
-
define_method "
|
6
|
+
define_method "test_fifty_move_rule_#{name}" do
|
7
7
|
pgn = Chess::Pgn.new(file)
|
8
8
|
game = Chess::Game.new(pgn.moves)
|
9
|
-
assert
|
9
|
+
assert game.board.fifty_move_rule?
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/test/test_game.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ChessTest < Minitest::Test
|
4
|
+
def test_moves
|
5
|
+
game = Chess::Game.new
|
6
|
+
game.moves = %w[e4 e5]
|
7
|
+
assert_equal %w[e4 e5], game.moves
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_active_player
|
11
|
+
game = Chess::Game.new
|
12
|
+
game << 'a3'
|
13
|
+
assert_equal :black, game.active_player
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_inactive_player
|
17
|
+
game = Chess::Game.new
|
18
|
+
game.moves = %w[a3 f5]
|
19
|
+
assert_equal :black, game.inactive_player
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_status_white_won_resign
|
23
|
+
game = Chess::Game.new
|
24
|
+
game.resign(:black)
|
25
|
+
assert_equal :white_won_resign, game.status
|
26
|
+
assert game.over?
|
27
|
+
assert '1-0', game.result
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_status_black_won_resign
|
31
|
+
game = Chess::Game.new
|
32
|
+
game << 'e4'
|
33
|
+
game.resign(:white)
|
34
|
+
assert_equal :black_won_resign, game.status
|
35
|
+
assert game.over?
|
36
|
+
assert '0-1', game.result
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_status_insufficient_material
|
40
|
+
pgn = TestHelper.pick_pgn('insufficient_material/0001.pgn')
|
41
|
+
game = Chess::Game.new(pgn.moves)
|
42
|
+
assert_equal :insufficient_material, game.status
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_status_fifty_move_rule
|
46
|
+
pgn = TestHelper.pick_pgn('fifty_move_rule/0001.pgn')
|
47
|
+
game = Chess::Game.new(pgn.moves)
|
48
|
+
game.draw
|
49
|
+
assert_equal :fifty_move_rule, game.status
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_status_threefold_repetition
|
53
|
+
pgn = TestHelper.pick_pgn('threefold_repetition/0001.pgn')
|
54
|
+
game = Chess::Game.new(pgn.moves)
|
55
|
+
game.draw
|
56
|
+
assert_equal :threefold_repetition, game.status
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_pgn
|
60
|
+
pgn = TestHelper.pick_pgn('valid/0001.pgn')
|
61
|
+
game = Chess::Game.new(pgn.moves)
|
62
|
+
expected_pgn = <<~PGN
|
63
|
+
[Event ""]
|
64
|
+
[Site ""]
|
65
|
+
[Date "??"]
|
66
|
+
[Round ""]
|
67
|
+
[White ""]
|
68
|
+
[Black ""]
|
69
|
+
[Result "*"]
|
70
|
+
|
71
|
+
1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Qxd4 Nc6 5. Bb5 Bd7 6. Bxc6 Bxc6 7. Bg5 Nf6
|
72
|
+
8. Bxf6 gxf6 9. Nc3 e6 10. O-O-O Be7 11. Rhe1 Rg8 12. Qe3 Rxg2 13. Rg1 Rg6 14.
|
73
|
+
Nd4 Qb6 15. h4 O-O-O 16. h5 Rg5 17. Nd5 Bxd5 18. exd5 e5 19. Qh3+ Kb8 20. Nf5
|
74
|
+
Bf8 21. Rxg5 fxg5 22. Ne3 Qb4 23. c4 g4 24. Qxg4 Bh6 25. Kb1 Rc8 26. Rc1 Qd2
|
75
|
+
27. Qf5 Bf4 28. Qc2 Qxc2+ 29. Rxc2 Rg8 30. b4 Rg5 31. c5 e4 32. c6 Rxh5 33.
|
76
|
+
Rc4 f5 34. b5 Rg5 35. Rc3 Be5 36. Rc1 Bd4 37. Nc4 Bc5 38. Ne5 dxe5 39. Rxc5
|
77
|
+
Rg6 40. a4 Rd6 41. a5 b6 42. axb6 axb6 43. Rc2 Rxd5 44. Rb2 h5 45. Ka2 h4 46.
|
78
|
+
Ka3 h3 47. Ka4 Rd1 *
|
79
|
+
PGN
|
80
|
+
assert_equal expected_pgn, game.pgn.to_s
|
81
|
+
end
|
82
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,5 +1,15 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start do
|
3
|
+
add_filter 'lib/chess/gnuchess.rb'
|
4
|
+
end
|
5
|
+
if ENV['CODECOV'] == 'true'
|
6
|
+
require 'codecov'
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
8
|
+
end
|
9
|
+
|
1
10
|
require 'chess'
|
2
11
|
require 'minitest/autorun'
|
12
|
+
require 'byebug'
|
3
13
|
|
4
14
|
module TestHelper
|
5
15
|
PGN_COLLECTION = 'test/pgn_collection'.freeze
|
@@ -8,4 +18,9 @@ module TestHelper
|
|
8
18
|
def self.pgns(path, prefix = PGN_COLLECTION)
|
9
19
|
Dir[File.join(prefix, path, '**/*.pgn')]
|
10
20
|
end
|
21
|
+
|
22
|
+
def self.pick_pgn(path, prefix = PGN_COLLECTION)
|
23
|
+
file = File.join(prefix, path)
|
24
|
+
return Chess::Pgn.new(file)
|
25
|
+
end
|
11
26
|
end
|
@@ -17,15 +17,15 @@ class ChessTest < Minitest::Test
|
|
17
17
|
FENS.each_with_index do |fen, i|
|
18
18
|
define_method("test_insufficient_material_by_fen_#{i}") do
|
19
19
|
game = Chess::Game.load_fen(fen)
|
20
|
-
assert
|
20
|
+
assert game.board.insufficient_material?
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
ONLY_KINGS_FENS.each_with_index do |fen, i|
|
25
25
|
define_method("test_only_kings_by_fen_#{i}") do
|
26
26
|
game = Chess::Game.load_fen(fen)
|
27
|
-
assert
|
28
|
-
assert
|
27
|
+
assert game.board.insufficient_material?
|
28
|
+
assert game.board.only_kings?
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -34,7 +34,7 @@ class ChessTest < Minitest::Test
|
|
34
34
|
define_method "test_insufficient_material_#{name}" do
|
35
35
|
pgn = Chess::Pgn.new(file)
|
36
36
|
game = Chess::Game.new(pgn.moves)
|
37
|
-
assert
|
37
|
+
assert game.board.insufficient_material?
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
data/test/test_move_generator.rb
CHANGED
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class ChessTest < Minitest::Test
|
4
4
|
GENS = {
|
5
|
-
'r2qk3/8/2n5/8/8/8/p2B4/4K2R w K - 0 1' => { 'e1' => [
|
5
|
+
'r2qk3/8/2n5/8/8/8/p2B4/4K2R w K - 0 1' => { 'e1' => %w[Kd1 Ke2 Kf2 Kf1 O-O] },
|
6
6
|
'r2qk3/8/2n5/8/8/8/p2B4/4K2R w - - 0 1' => { 'e1' => %w[Kd1 Ke2 Kf2 Kf1] },
|
7
7
|
'r2qk3/8/2n5/2b5/8/8/p2B4/4K2R w K - 0 1' => { 'e1' => %w[Kd1 Ke2 Kf1] },
|
8
8
|
'r2qk3/8/2n5/2b5/8/8/p2B4/4K2R b K - 0 1' => { 'a2' => ['a1=Q'] },
|
@@ -12,7 +12,8 @@ class ChessTest < Minitest::Test
|
|
12
12
|
'1B1k4/r3q3/2n1n3/2b2pP1/8/8/2nB4/3K3R b - - 0 1' => { 'c6' => %w[Nxb8 Ne5 Nc6d4 N6b4 Na5] },
|
13
13
|
'1B1k4/r3q3/2n1n2P/2b5/5p2/3p1RP1/3B4/3K4 w - - 0 1' => { 'f3' => %w[Rxd3 Re3 Rxf4 Rf2 Rf1] },
|
14
14
|
'k7/1Q6/2P5/8/8/8/8/3K4 b - - 0 1' => { 'a8' => [] },
|
15
|
-
'k7/6P1/8/8/8/3r4/3Q4/3K4 w - - 0 1' => { 'd2' => ['Qxd3'] }
|
15
|
+
'k7/6P1/8/8/8/3r4/3Q4/3K4 w - - 0 1' => { 'd2' => ['Qxd3'] },
|
16
|
+
'rnbqkbnr/1ppppppp/8/8/pP2P3/P7/2PP1PPP/RNBQKBNR w KQkq - 0 3' => { 'c2' => %w[c3 c4] }
|
16
17
|
}.freeze
|
17
18
|
|
18
19
|
GENS.each do |fen, generators|
|
data/test/test_pgn.rb
CHANGED
@@ -67,4 +67,39 @@ class ChessTest < Minitest::Test
|
|
67
67
|
assert_nil pgn.result
|
68
68
|
assert_equal 'Re6', pgn.moves.last
|
69
69
|
end
|
70
|
+
|
71
|
+
def test_write_pgn
|
72
|
+
tempfile = Tempfile.new('test_pgn')
|
73
|
+
game = Chess::Game.new
|
74
|
+
game.moves = %w[e4 e5 d3]
|
75
|
+
pgn = game.pgn
|
76
|
+
pgn.event = 'Ruby Chess Tournament'
|
77
|
+
pgn.site = 'Ruby Chess test suite'
|
78
|
+
pgn.date = '1984.10.21'
|
79
|
+
pgn.round = '2'
|
80
|
+
pgn.white = 'Pioz'
|
81
|
+
pgn.black = 'Elizabeth Harmon'
|
82
|
+
pgn.write(tempfile.path)
|
83
|
+
|
84
|
+
loaded_pgn = Chess::Pgn.new
|
85
|
+
loaded_pgn.load(tempfile.path)
|
86
|
+
tempfile.delete
|
87
|
+
assert_equal 'Ruby Chess Tournament', loaded_pgn.event
|
88
|
+
assert_equal 'Ruby Chess test suite', loaded_pgn.site
|
89
|
+
assert_equal '1984.10.21', loaded_pgn.date
|
90
|
+
assert_equal '2', loaded_pgn.round
|
91
|
+
assert_equal 'Pioz', loaded_pgn.white
|
92
|
+
assert_equal 'Elizabeth Harmon', loaded_pgn.black
|
93
|
+
assert_equal '*', loaded_pgn.result
|
94
|
+
assert_equal %w[e4 e5 d3], loaded_pgn.moves
|
95
|
+
end
|
96
|
+
|
97
|
+
def test_set_date
|
98
|
+
pgn = Chess::Pgn.new
|
99
|
+
pgn.date = Time.parse('21-10-1984')
|
100
|
+
assert_equal '1984.10.21', pgn.date
|
101
|
+
|
102
|
+
pgn.date = '1984.10.21'
|
103
|
+
assert_equal '1984.10.21', pgn.date
|
104
|
+
end
|
70
105
|
end
|
data/test/test_pgn_collection.rb
CHANGED
@@ -8,8 +8,8 @@ class ChessTest < Minitest::Test
|
|
8
8
|
game = Chess::Game.new
|
9
9
|
pgn.moves.each do |m|
|
10
10
|
game.move(m)
|
11
|
-
assert(game.board.check?) if m
|
12
|
-
assert(game.board.checkmate?) if m
|
11
|
+
assert(game.board.check?) if m.match?(/\+$/)
|
12
|
+
assert(game.board.checkmate?) if m.match?(/\#$/)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
define_method "test_pgn_result_#{name}" do
|
data/test/test_stalemate.rb
CHANGED
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enrico Pilotto
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '11'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '11'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: codecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.4'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.4'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: minitest
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +72,42 @@ dependencies:
|
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
75
|
+
version: '13'
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
80
|
- - "~>"
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
82
|
+
version: '13'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: rubocop
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
87
|
- - "~>"
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
89
|
+
version: '1'
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
94
|
- - "~>"
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
96
|
+
version: '1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-minitest
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.10'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.10'
|
69
111
|
- !ruby/object:Gem::Dependency
|
70
112
|
name: rubocop-performance
|
71
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +122,34 @@ dependencies:
|
|
80
122
|
- - "~>"
|
81
123
|
- !ruby/object:Gem::Version
|
82
124
|
version: '1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.5'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.5'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.21'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.21'
|
83
153
|
- !ruby/object:Gem::Dependency
|
84
154
|
name: yard
|
85
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,13 +172,41 @@ extensions:
|
|
102
172
|
- ext/extconf.rb
|
103
173
|
extra_rdoc_files: []
|
104
174
|
files:
|
175
|
+
- ".github/FUNDING.yml"
|
176
|
+
- ".github/workflows/ruby.yml"
|
105
177
|
- ".gitignore"
|
106
178
|
- ".rubocop.yml"
|
107
179
|
- Gemfile
|
180
|
+
- Gemfile.lock
|
108
181
|
- LICENSE
|
109
182
|
- README.md
|
110
183
|
- Rakefile
|
111
184
|
- chess.gemspec
|
185
|
+
- docs/Chess.html
|
186
|
+
- docs/Chess/BadNotationError.html
|
187
|
+
- docs/Chess/Board.html
|
188
|
+
- docs/Chess/CGame.html
|
189
|
+
- docs/Chess/Game.html
|
190
|
+
- docs/Chess/Gnuchess.html
|
191
|
+
- docs/Chess/IllegalMoveError.html
|
192
|
+
- docs/Chess/InvalidFenFormatError.html
|
193
|
+
- docs/Chess/InvalidPgnFormatError.html
|
194
|
+
- docs/Chess/Pgn.html
|
195
|
+
- docs/Chess/UTF8Notation.html
|
196
|
+
- docs/_index.html
|
197
|
+
- docs/class_list.html
|
198
|
+
- docs/css/common.css
|
199
|
+
- docs/css/full_list.css
|
200
|
+
- docs/css/style.css
|
201
|
+
- docs/file.README.html
|
202
|
+
- docs/file_list.html
|
203
|
+
- docs/frames.html
|
204
|
+
- docs/index.html
|
205
|
+
- docs/js/app.js
|
206
|
+
- docs/js/full_list.js
|
207
|
+
- docs/js/jquery.js
|
208
|
+
- docs/method_list.html
|
209
|
+
- docs/top-level-namespace.html
|
112
210
|
- ext/MakefileC
|
113
211
|
- ext/bitboard.c
|
114
212
|
- ext/bitboard.h
|
@@ -1339,7 +1437,9 @@ files:
|
|
1339
1437
|
- test/pgn_collection/valid/1000.pgn
|
1340
1438
|
- test/test_big_pgn_collection.rb
|
1341
1439
|
- test/test_checkmate.rb
|
1440
|
+
- test/test_errors.rb
|
1342
1441
|
- test/test_fifty_rule_move.rb
|
1442
|
+
- test/test_game.rb
|
1343
1443
|
- test/test_helper.rb
|
1344
1444
|
- test/test_illegal_moves.rb
|
1345
1445
|
- test/test_insufficient_material.rb
|
@@ -1354,7 +1454,7 @@ homepage: https://github.com/pioz/chess
|
|
1354
1454
|
licenses:
|
1355
1455
|
- LGPLv3
|
1356
1456
|
metadata: {}
|
1357
|
-
post_install_message:
|
1457
|
+
post_install_message:
|
1358
1458
|
rdoc_options: []
|
1359
1459
|
require_paths:
|
1360
1460
|
- lib
|
@@ -1362,7 +1462,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1362
1462
|
requirements:
|
1363
1463
|
- - ">="
|
1364
1464
|
- !ruby/object:Gem::Version
|
1365
|
-
version: '2.
|
1465
|
+
version: '2.5'
|
1366
1466
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1367
1467
|
requirements:
|
1368
1468
|
- - ">="
|
@@ -1370,7 +1470,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1370
1470
|
version: '0'
|
1371
1471
|
requirements: []
|
1372
1472
|
rubygems_version: 3.0.2
|
1373
|
-
signing_key:
|
1473
|
+
signing_key:
|
1374
1474
|
specification_version: 4
|
1375
1475
|
summary: A fast chess library to play chess with Ruby.
|
1376
1476
|
test_files:
|
@@ -2583,7 +2683,9 @@ test_files:
|
|
2583
2683
|
- test/pgn_collection/valid/1000.pgn
|
2584
2684
|
- test/test_big_pgn_collection.rb
|
2585
2685
|
- test/test_checkmate.rb
|
2686
|
+
- test/test_errors.rb
|
2586
2687
|
- test/test_fifty_rule_move.rb
|
2688
|
+
- test/test_game.rb
|
2587
2689
|
- test/test_helper.rb
|
2588
2690
|
- test/test_illegal_moves.rb
|
2589
2691
|
- test/test_insufficient_material.rb
|