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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -528
  3. data/VERSION.semver +1 -1
  4. data/lib/sashite/ggn.rb +2 -2
  5. data/lib/sashite/ggn/ability.rb +2 -20
  6. data/lib/sashite/ggn/gameplay.rb +2 -13
  7. data/lib/sashite/ggn/object.rb +2 -21
  8. data/lib/sashite/ggn/pattern.rb +2 -13
  9. data/lib/sashite/ggn/square.rb +2 -24
  10. data/lib/sashite/ggn/state.rb +2 -21
  11. data/lib/sashite/ggn/subject.rb +2 -22
  12. data/lib/sashite/ggn/verb.rb +2 -28
  13. data/sashite-ggn.gemspec +2 -2
  14. data/test/test_ggn.rb +6 -543
  15. data/test/test_ggn_ability.rb +28 -38
  16. data/test/test_ggn_gameplay.rb +8 -548
  17. data/test/test_ggn_object.rb +30 -22
  18. data/test/test_ggn_pattern.rb +8 -75
  19. data/test/test_ggn_square.rb +30 -14
  20. data/test/test_ggn_state.rb +18 -13
  21. data/test/test_ggn_subject.rb +30 -17
  22. data/test/test_ggn_verb.rb +18 -16
  23. metadata +4 -73
  24. data/lib/sashite/ggn/actor.rb +0 -20
  25. data/lib/sashite/ggn/ally.rb +0 -20
  26. data/lib/sashite/ggn/area.rb +0 -17
  27. data/lib/sashite/ggn/attacked.rb +0 -20
  28. data/lib/sashite/ggn/boolean.rb +0 -17
  29. data/lib/sashite/ggn/digit.rb +0 -20
  30. data/lib/sashite/ggn/digit_excluding_zero.rb +0 -17
  31. data/lib/sashite/ggn/direction.rb +0 -19
  32. data/lib/sashite/ggn/gameplay_into_base64.rb +0 -21
  33. data/lib/sashite/ggn/integer.rb +0 -20
  34. data/lib/sashite/ggn/last_moved_actor.rb +0 -20
  35. data/lib/sashite/ggn/maximum_magnitude.rb +0 -20
  36. data/lib/sashite/ggn/name.rb +0 -17
  37. data/lib/sashite/ggn/negative_integer.rb +0 -19
  38. data/lib/sashite/ggn/null.rb +0 -21
  39. data/lib/sashite/ggn/occupied.rb +0 -29
  40. data/lib/sashite/ggn/previous_moves_counter.rb +0 -20
  41. data/lib/sashite/ggn/promotable_into_actors.rb +0 -23
  42. data/lib/sashite/ggn/required.rb +0 -19
  43. data/lib/sashite/ggn/self.rb +0 -21
  44. data/lib/sashite/ggn/unsigned_integer.rb +0 -20
  45. data/lib/sashite/ggn/unsigned_integer_excluding_zero.rb +0 -20
  46. data/lib/sashite/ggn/zero.rb +0 -21
  47. data/test/test_ggn_actor.rb +0 -571
  48. data/test/test_ggn_ally.rb +0 -35
  49. data/test/test_ggn_area.rb +0 -21
  50. data/test/test_ggn_attacked.rb +0 -35
  51. data/test/test_ggn_boolean.rb +0 -21
  52. data/test/test_ggn_digit.rb +0 -21
  53. data/test/test_ggn_digit_excluding_zero.rb +0 -21
  54. data/test/test_ggn_direction.rb +0 -21
  55. data/test/test_ggn_gameplay_into_base64.rb +0 -555
  56. data/test/test_ggn_integer.rb +0 -39
  57. data/test/test_ggn_last_moved_actor.rb +0 -35
  58. data/test/test_ggn_maximum_magnitude.rb +0 -39
  59. data/test/test_ggn_name.rb +0 -21
  60. data/test/test_ggn_negative_integer.rb +0 -21
  61. data/test/test_ggn_null.rb +0 -21
  62. data/test/test_ggn_occupied.rb +0 -78
  63. data/test/test_ggn_previous_moves_counter.rb +0 -39
  64. data/test/test_ggn_promotable_into_actors.rb +0 -578
  65. data/test/test_ggn_required.rb +0 -21
  66. data/test/test_ggn_self.rb +0 -21
  67. data/test/test_ggn_unsigned_integer.rb +0 -39
  68. data/test/test_ggn_unsigned_integer_excluding_zero.rb +0 -25
  69. data/test/test_ggn_zero.rb +0 -21
@@ -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
@@ -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
@@ -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