sashite-ggn 0.2.0 → 0.5.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 +115 -28
- data/lib/sashite/ggn/move_validator.rb +180 -0
- data/lib/sashite/ggn/ruleset/source/destination/engine/transition.rb +90 -0
- data/lib/sashite/ggn/ruleset/source/destination/engine.rb +454 -0
- data/lib/sashite/ggn/ruleset/source/destination.rb +65 -0
- data/lib/sashite/ggn/ruleset/source.rb +71 -0
- data/lib/sashite/ggn/ruleset.rb +371 -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 +32 -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
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
|