sashite-ggn 0.2.0 → 0.3.0
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 +5 -5
- data/LICENSE.md +17 -18
- data/README.md +398 -28
- data/lib/sashite/ggn/piece/source/destination/engine/transition.rb +90 -0
- data/lib/sashite/ggn/piece/source/destination/engine.rb +407 -0
- data/lib/sashite/ggn/piece/source/destination.rb +65 -0
- data/lib/sashite/ggn/piece/source.rb +71 -0
- data/lib/sashite/ggn/piece.rb +77 -0
- data/lib/sashite/ggn/schema.rb +152 -0
- data/lib/sashite/ggn/validation_error.rb +31 -0
- data/lib/sashite/ggn.rb +317 -5
- data/lib/sashite-ggn.rb +112 -1
- metadata +31 -82
- data/.gitignore +0 -22
- data/.ruby-version +0 -1
- data/.travis.yml +0 -3
- data/Gemfile +0 -2
- data/Rakefile +0 -7
- data/VERSION.semver +0 -1
- data/lib/sashite/ggn/ability.rb +0 -11
- data/lib/sashite/ggn/gameplay.rb +0 -9
- data/lib/sashite/ggn/object.rb +0 -9
- data/lib/sashite/ggn/pattern.rb +0 -9
- data/lib/sashite/ggn/square.rb +0 -7
- data/lib/sashite/ggn/state.rb +0 -7
- data/lib/sashite/ggn/subject.rb +0 -9
- data/lib/sashite/ggn/verb.rb +0 -7
- data/sashite-ggn.gemspec +0 -19
- data/test/_test_helper.rb +0 -2
- data/test/test_ggn.rb +0 -15
- data/test/test_ggn_ability.rb +0 -41
- data/test/test_ggn_gameplay.rb +0 -17
- data/test/test_ggn_object.rb +0 -41
- data/test/test_ggn_pattern.rb +0 -17
- data/test/test_ggn_square.rb +0 -41
- data/test/test_ggn_state.rb +0 -29
- data/test/test_ggn_subject.rb +0 -41
- data/test/test_ggn_verb.rb +0 -29
metadata
CHANGED
@@ -1,98 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sashite-ggn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Cyril
|
8
|
-
autorequire:
|
7
|
+
- Cyril Kato
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
13
|
+
name: json_schemer
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
18
|
+
version: 2.4.0
|
19
|
+
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
version: '5'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '5'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '10'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '10'
|
55
|
-
description: A Ruby interface for GGN (General Gameplay Notation) objects.
|
56
|
-
email:
|
57
|
-
- contact@cyril.io
|
25
|
+
version: 2.4.0
|
26
|
+
description: A Ruby implementation of the General Gameplay Notation (GGN) specification.
|
27
|
+
GGN is a rule-agnostic, JSON-based format for describing pseudo-legal moves in abstract
|
28
|
+
strategy board games. This library provides parsing, validation, and evaluation
|
29
|
+
capabilities for GGN documents, enabling game engines to work with movement rules
|
30
|
+
across different board games including Chess, Shogi, Xiangqi, and custom variants.
|
31
|
+
email: contact@cyril.email
|
58
32
|
executables: []
|
59
33
|
extensions: []
|
60
34
|
extra_rdoc_files: []
|
61
35
|
files:
|
62
|
-
- ".gitignore"
|
63
|
-
- ".ruby-version"
|
64
|
-
- ".travis.yml"
|
65
|
-
- Gemfile
|
66
36
|
- LICENSE.md
|
67
37
|
- README.md
|
68
|
-
- Rakefile
|
69
|
-
- VERSION.semver
|
70
38
|
- lib/sashite-ggn.rb
|
71
39
|
- lib/sashite/ggn.rb
|
72
|
-
- lib/sashite/ggn/
|
73
|
-
- lib/sashite/ggn/
|
74
|
-
- lib/sashite/ggn/
|
75
|
-
- lib/sashite/ggn/
|
76
|
-
- lib/sashite/ggn/
|
77
|
-
- lib/sashite/ggn/
|
78
|
-
- lib/sashite/ggn/
|
79
|
-
- lib/sashite/ggn/verb.rb
|
80
|
-
- sashite-ggn.gemspec
|
81
|
-
- test/_test_helper.rb
|
82
|
-
- test/test_ggn.rb
|
83
|
-
- test/test_ggn_ability.rb
|
84
|
-
- test/test_ggn_gameplay.rb
|
85
|
-
- test/test_ggn_object.rb
|
86
|
-
- test/test_ggn_pattern.rb
|
87
|
-
- test/test_ggn_square.rb
|
88
|
-
- test/test_ggn_state.rb
|
89
|
-
- test/test_ggn_subject.rb
|
90
|
-
- test/test_ggn_verb.rb
|
40
|
+
- lib/sashite/ggn/piece.rb
|
41
|
+
- lib/sashite/ggn/piece/source.rb
|
42
|
+
- lib/sashite/ggn/piece/source/destination.rb
|
43
|
+
- lib/sashite/ggn/piece/source/destination/engine.rb
|
44
|
+
- lib/sashite/ggn/piece/source/destination/engine/transition.rb
|
45
|
+
- lib/sashite/ggn/schema.rb
|
46
|
+
- lib/sashite/ggn/validation_error.rb
|
91
47
|
homepage: https://github.com/sashite/ggn.rb
|
92
48
|
licenses:
|
93
49
|
- MIT
|
94
|
-
metadata:
|
95
|
-
|
50
|
+
metadata:
|
51
|
+
bug_tracker_uri: https://github.com/sashite/ggn.rb/issues
|
52
|
+
documentation_uri: https://rubydoc.info/github/sashite/ggn.rb/main
|
53
|
+
homepage_uri: https://github.com/sashite/ggn.rb
|
54
|
+
source_code_uri: https://github.com/sashite/ggn.rb
|
55
|
+
specification_uri: https://sashite.dev/documents/ggn/1.0.0/
|
56
|
+
rubygems_mfa_required: 'true'
|
96
57
|
rdoc_options: []
|
97
58
|
require_paths:
|
98
59
|
- lib
|
@@ -100,26 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
61
|
requirements:
|
101
62
|
- - ">="
|
102
63
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
64
|
+
version: 3.2.0
|
104
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
66
|
requirements:
|
106
67
|
- - ">="
|
107
68
|
- !ruby/object:Gem::Version
|
108
69
|
version: '0'
|
109
70
|
requirements: []
|
110
|
-
|
111
|
-
rubygems_version: 2.2.2
|
112
|
-
signing_key:
|
71
|
+
rubygems_version: 3.6.9
|
113
72
|
specification_version: 4
|
114
|
-
summary:
|
115
|
-
test_files:
|
116
|
-
- test/_test_helper.rb
|
117
|
-
- test/test_ggn.rb
|
118
|
-
- test/test_ggn_ability.rb
|
119
|
-
- test/test_ggn_gameplay.rb
|
120
|
-
- test/test_ggn_object.rb
|
121
|
-
- test/test_ggn_pattern.rb
|
122
|
-
- test/test_ggn_square.rb
|
123
|
-
- test/test_ggn_state.rb
|
124
|
-
- test/test_ggn_subject.rb
|
125
|
-
- test/test_ggn_verb.rb
|
73
|
+
summary: General Gameplay Notation (GGN) parser and validator for Ruby
|
74
|
+
test_files: []
|
data/.gitignore
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
|
-
_yardoc
|
9
|
-
coverage
|
10
|
-
doc/
|
11
|
-
lib/bundler/man
|
12
|
-
pkg
|
13
|
-
rdoc
|
14
|
-
spec/reports
|
15
|
-
test/tmp
|
16
|
-
test/version_tmp
|
17
|
-
tmp
|
18
|
-
*.bundle
|
19
|
-
*.so
|
20
|
-
*.o
|
21
|
-
*.a
|
22
|
-
mkmf.log
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.2
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/VERSION.semver
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.2.0
|
data/lib/sashite/ggn/ability.rb
DELETED
data/lib/sashite/ggn/gameplay.rb
DELETED
data/lib/sashite/ggn/object.rb
DELETED
data/lib/sashite/ggn/pattern.rb
DELETED
data/lib/sashite/ggn/square.rb
DELETED
data/lib/sashite/ggn/state.rb
DELETED
data/lib/sashite/ggn/subject.rb
DELETED
data/lib/sashite/ggn/verb.rb
DELETED
data/sashite-ggn.gemspec
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |spec|
|
2
|
-
spec.name = 'sashite-ggn'
|
3
|
-
spec.version = File.read('VERSION.semver')
|
4
|
-
spec.authors = ['Cyril Wack']
|
5
|
-
spec.email = ['contact@cyril.io']
|
6
|
-
spec.summary = %q{Some mappers for GGN objects}
|
7
|
-
spec.description = %q{A Ruby interface for GGN (General Gameplay Notation) objects.}
|
8
|
-
spec.homepage = 'https://github.com/sashite/ggn.rb'
|
9
|
-
spec.license = 'MIT'
|
10
|
-
|
11
|
-
spec.files = `git ls-files -z`.split("\x0")
|
12
|
-
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
|
13
|
-
spec.test_files = spec.files.grep(%r{^test/})
|
14
|
-
spec.require_paths = ['lib']
|
15
|
-
|
16
|
-
spec.add_development_dependency 'bundler', '~> 1.6'
|
17
|
-
spec.add_development_dependency 'minitest', '~> 5'
|
18
|
-
spec.add_development_dependency 'rake', '~> 10'
|
19
|
-
end
|
data/test/_test_helper.rb
DELETED
data/test/test_ggn.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN do
|
4
|
-
subject { Sashite::GGN.new }
|
5
|
-
|
6
|
-
describe 'GGN instance' do
|
7
|
-
it 'responds to patterns' do
|
8
|
-
subject.must_respond_to :patterns
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'responds to patterns=' do
|
12
|
-
subject.must_respond_to :patterns=
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
data/test/test_ggn_ability.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Ability do
|
4
|
-
subject { Sashite::GGN::Ability.new }
|
5
|
-
|
6
|
-
describe '#subject' do
|
7
|
-
it 'responds to subject' do
|
8
|
-
subject.must_respond_to :subject
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#subject=' do
|
13
|
-
it 'responds to subject=' do
|
14
|
-
subject.must_respond_to :subject=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#verb' do
|
19
|
-
it 'responds to verb' do
|
20
|
-
subject.must_respond_to :verb
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#verb=' do
|
25
|
-
it 'responds to verb=' do
|
26
|
-
subject.must_respond_to :verb=
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#object' do
|
31
|
-
it 'responds to object' do
|
32
|
-
subject.must_respond_to :object
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe '#object=' do
|
37
|
-
it 'responds to object=' do
|
38
|
-
subject.must_respond_to :object=
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
data/test/test_ggn_gameplay.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Gameplay do
|
4
|
-
subject { Sashite::GGN::Gameplay.new }
|
5
|
-
|
6
|
-
describe '#patterns' do
|
7
|
-
it 'responds to patterns' do
|
8
|
-
subject.must_respond_to :patterns
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#patterns=' do
|
13
|
-
it 'responds to patterns=' do
|
14
|
-
subject.must_respond_to :patterns=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/test/test_ggn_object.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Object do
|
4
|
-
subject { Sashite::GGN::Object.new }
|
5
|
-
|
6
|
-
describe '#src_square' do
|
7
|
-
it 'responds to src_square' do
|
8
|
-
subject.must_respond_to :src_square
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#src_square=' do
|
13
|
-
it 'responds to src_square=' do
|
14
|
-
subject.must_respond_to :src_square=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#dst_square' do
|
19
|
-
it 'responds to dst_square' do
|
20
|
-
subject.must_respond_to :dst_square
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#dst_square=' do
|
25
|
-
it 'responds to dst_square=' do
|
26
|
-
subject.must_respond_to :dst_square=
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#promotable_into_actors' do
|
31
|
-
it 'responds to promotable_into_actors' do
|
32
|
-
subject.must_respond_to :promotable_into_actors
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe '#promotable_into_actors=' do
|
37
|
-
it 'responds to promotable_into_actors=' do
|
38
|
-
subject.must_respond_to :promotable_into_actors=
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
data/test/test_ggn_pattern.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Pattern do
|
4
|
-
subject { Sashite::GGN::Pattern.new }
|
5
|
-
|
6
|
-
describe '#abilities' do
|
7
|
-
it 'responds to abilities' do
|
8
|
-
subject.must_respond_to :abilities
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#abilities=' do
|
13
|
-
it 'responds to abilities=' do
|
14
|
-
subject.must_respond_to :abilities=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/test/test_ggn_square.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Square do
|
4
|
-
subject { Sashite::GGN::Square.new }
|
5
|
-
|
6
|
-
describe '#attacked' do
|
7
|
-
it 'responds to attacked' do
|
8
|
-
subject.must_respond_to :attacked
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#attacked=' do
|
13
|
-
it 'responds to attacked=' do
|
14
|
-
subject.must_respond_to :attacked=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#occupied' do
|
19
|
-
it 'responds to occupied' do
|
20
|
-
subject.must_respond_to :occupied
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#occupied=' do
|
25
|
-
it 'responds to occupied=' do
|
26
|
-
subject.must_respond_to :occupied=
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#area' do
|
31
|
-
it 'responds to area' do
|
32
|
-
subject.must_respond_to :area
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe '#area=' do
|
37
|
-
it 'responds to area=' do
|
38
|
-
subject.must_respond_to :area=
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
data/test/test_ggn_state.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::State do
|
4
|
-
subject { Sashite::GGN::State.new }
|
5
|
-
|
6
|
-
describe '#last_moved_actor' do
|
7
|
-
it 'responds to last_moved_actor' do
|
8
|
-
subject.must_respond_to :last_moved_actor
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#last_moved_actor=' do
|
13
|
-
it 'responds to last_moved_actor=' do
|
14
|
-
subject.must_respond_to :last_moved_actor=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#previous_moves_counter' do
|
19
|
-
it 'responds to previous_moves_counter' do
|
20
|
-
subject.must_respond_to :previous_moves_counter
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#previous_moves_counter=' do
|
25
|
-
it 'responds to previous_moves_counter=' do
|
26
|
-
subject.must_respond_to :previous_moves_counter=
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/test/test_ggn_subject.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Subject do
|
4
|
-
subject { Sashite::GGN::Subject.new }
|
5
|
-
|
6
|
-
describe '#ally' do
|
7
|
-
it 'responds to ally' do
|
8
|
-
subject.must_respond_to :ally
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#ally=' do
|
13
|
-
it 'responds to ally=' do
|
14
|
-
subject.must_respond_to :ally=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#actor' do
|
19
|
-
it 'responds to actor' do
|
20
|
-
subject.must_respond_to :actor
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#actor=' do
|
25
|
-
it 'responds to actor=' do
|
26
|
-
subject.must_respond_to :actor=
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#state' do
|
31
|
-
it 'responds to state' do
|
32
|
-
subject.must_respond_to :state
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe '#state=' do
|
37
|
-
it 'responds to state=' do
|
38
|
-
subject.must_respond_to :state=
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
data/test/test_ggn_verb.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Verb do
|
4
|
-
subject { Sashite::GGN::Verb.new }
|
5
|
-
|
6
|
-
describe '#name' do
|
7
|
-
it 'responds to name' do
|
8
|
-
subject.must_respond_to :name
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '#name=' do
|
13
|
-
it 'responds to name=' do
|
14
|
-
subject.must_respond_to :name=
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#vector' do
|
19
|
-
it 'responds to vector' do
|
20
|
-
subject.must_respond_to :vector
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#vector=' do
|
25
|
-
it 'responds to vector=' do
|
26
|
-
subject.must_respond_to :vector=
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|