sashite-ggn 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -528
- data/VERSION.semver +1 -1
- data/lib/sashite/ggn.rb +2 -2
- data/lib/sashite/ggn/ability.rb +2 -20
- data/lib/sashite/ggn/gameplay.rb +2 -13
- data/lib/sashite/ggn/object.rb +2 -21
- data/lib/sashite/ggn/pattern.rb +2 -13
- data/lib/sashite/ggn/square.rb +2 -24
- data/lib/sashite/ggn/state.rb +2 -21
- data/lib/sashite/ggn/subject.rb +2 -22
- data/lib/sashite/ggn/verb.rb +2 -28
- data/sashite-ggn.gemspec +2 -2
- data/test/test_ggn.rb +6 -543
- data/test/test_ggn_ability.rb +28 -38
- data/test/test_ggn_gameplay.rb +8 -548
- data/test/test_ggn_object.rb +30 -22
- data/test/test_ggn_pattern.rb +8 -75
- data/test/test_ggn_square.rb +30 -14
- data/test/test_ggn_state.rb +18 -13
- data/test/test_ggn_subject.rb +30 -17
- data/test/test_ggn_verb.rb +18 -16
- metadata +4 -73
- data/lib/sashite/ggn/actor.rb +0 -20
- data/lib/sashite/ggn/ally.rb +0 -20
- data/lib/sashite/ggn/area.rb +0 -17
- data/lib/sashite/ggn/attacked.rb +0 -20
- data/lib/sashite/ggn/boolean.rb +0 -17
- data/lib/sashite/ggn/digit.rb +0 -20
- data/lib/sashite/ggn/digit_excluding_zero.rb +0 -17
- data/lib/sashite/ggn/direction.rb +0 -19
- data/lib/sashite/ggn/gameplay_into_base64.rb +0 -21
- data/lib/sashite/ggn/integer.rb +0 -20
- data/lib/sashite/ggn/last_moved_actor.rb +0 -20
- data/lib/sashite/ggn/maximum_magnitude.rb +0 -20
- data/lib/sashite/ggn/name.rb +0 -17
- data/lib/sashite/ggn/negative_integer.rb +0 -19
- data/lib/sashite/ggn/null.rb +0 -21
- data/lib/sashite/ggn/occupied.rb +0 -29
- data/lib/sashite/ggn/previous_moves_counter.rb +0 -20
- data/lib/sashite/ggn/promotable_into_actors.rb +0 -23
- data/lib/sashite/ggn/required.rb +0 -19
- data/lib/sashite/ggn/self.rb +0 -21
- data/lib/sashite/ggn/unsigned_integer.rb +0 -20
- data/lib/sashite/ggn/unsigned_integer_excluding_zero.rb +0 -20
- data/lib/sashite/ggn/zero.rb +0 -21
- data/test/test_ggn_actor.rb +0 -571
- data/test/test_ggn_ally.rb +0 -35
- data/test/test_ggn_area.rb +0 -21
- data/test/test_ggn_attacked.rb +0 -35
- data/test/test_ggn_boolean.rb +0 -21
- data/test/test_ggn_digit.rb +0 -21
- data/test/test_ggn_digit_excluding_zero.rb +0 -21
- data/test/test_ggn_direction.rb +0 -21
- data/test/test_ggn_gameplay_into_base64.rb +0 -555
- data/test/test_ggn_integer.rb +0 -39
- data/test/test_ggn_last_moved_actor.rb +0 -35
- data/test/test_ggn_maximum_magnitude.rb +0 -39
- data/test/test_ggn_name.rb +0 -21
- data/test/test_ggn_negative_integer.rb +0 -21
- data/test/test_ggn_null.rb +0 -21
- data/test/test_ggn_occupied.rb +0 -78
- data/test/test_ggn_previous_moves_counter.rb +0 -39
- data/test/test_ggn_promotable_into_actors.rb +0 -578
- data/test/test_ggn_required.rb +0 -21
- data/test/test_ggn_self.rb +0 -21
- data/test/test_ggn_unsigned_integer.rb +0 -39
- data/test/test_ggn_unsigned_integer_excluding_zero.rb +0 -25
- data/test/test_ggn_zero.rb +0 -21
data/test/test_ggn_required.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Required do
|
4
|
-
subject { Sashite::GGN::Required }
|
5
|
-
|
6
|
-
describe '.load' do
|
7
|
-
before do
|
8
|
-
@ggn_obj = 't'
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'loads a document from the current io stream' do
|
12
|
-
subject.load(@ggn_obj).must_equal true
|
13
|
-
end
|
14
|
-
|
15
|
-
describe 'errors' do
|
16
|
-
it 'raises without a boolean' do
|
17
|
-
-> { subject.load 'foobar' }.must_raise ArgumentError
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/test/test_ggn_self.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Self do
|
4
|
-
subject { Sashite::GGN::Self }
|
5
|
-
|
6
|
-
describe '.load' do
|
7
|
-
before do
|
8
|
-
@ggn_obj = 'self'
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'loads a document from the current io stream' do
|
12
|
-
subject.load(@ggn_obj).must_equal :self
|
13
|
-
end
|
14
|
-
|
15
|
-
describe 'errors' do
|
16
|
-
it 'raises without self' do
|
17
|
-
-> { subject.load '42' }.must_raise ArgumentError
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::UnsignedInteger do
|
4
|
-
subject { Sashite::GGN::UnsignedInteger }
|
5
|
-
|
6
|
-
describe '.load' do
|
7
|
-
describe 'a zero' do
|
8
|
-
before do
|
9
|
-
@ggn_obj = '0'
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'loads a document from the current io stream' do
|
13
|
-
subject.load(@ggn_obj).must_equal 0
|
14
|
-
end
|
15
|
-
|
16
|
-
describe 'errors' do
|
17
|
-
it 'raises with a double zero' do
|
18
|
-
-> { subject.load '00' }.must_raise ArgumentError
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe 'an unsigned integer excluding zero' do
|
24
|
-
before do
|
25
|
-
@ggn_obj = '42'
|
26
|
-
end
|
27
|
-
|
28
|
-
it 'loads a document from the current io stream' do
|
29
|
-
subject.load(@ggn_obj).must_equal 42
|
30
|
-
end
|
31
|
-
|
32
|
-
describe 'errors' do
|
33
|
-
it 'raises with a negative integer' do
|
34
|
-
-> { subject.load '-4' }.must_raise ArgumentError
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::UnsignedIntegerExcludingZero do
|
4
|
-
subject { Sashite::GGN::UnsignedIntegerExcludingZero }
|
5
|
-
|
6
|
-
describe '.load' do
|
7
|
-
before do
|
8
|
-
@ggn_obj = '42'
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'loads a document from the current io stream' do
|
12
|
-
subject.load(@ggn_obj).must_equal 42
|
13
|
-
end
|
14
|
-
|
15
|
-
describe 'errors' do
|
16
|
-
it 'raises with a negative integer' do
|
17
|
-
-> { subject.load '-42' }.must_raise ArgumentError
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'raises with a zero' do
|
21
|
-
-> { subject.load '0' }.must_raise ArgumentError
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/test/test_ggn_zero.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require_relative '_test_helper'
|
2
|
-
|
3
|
-
describe Sashite::GGN::Zero do
|
4
|
-
subject { Sashite::GGN::Zero }
|
5
|
-
|
6
|
-
describe '.load' do
|
7
|
-
before do
|
8
|
-
@ggn_obj = '0'
|
9
|
-
end
|
10
|
-
|
11
|
-
it 'loads a document from the current io stream' do
|
12
|
-
subject.load(@ggn_obj).must_equal 0
|
13
|
-
end
|
14
|
-
|
15
|
-
describe 'errors' do
|
16
|
-
it 'raises without zero' do
|
17
|
-
-> { subject.load '4' }.must_raise ArgumentError
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|