sashite-ggn 0.1.0 → 0.2.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.
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,35 +0,0 @@
1
- require_relative '_test_helper'
2
-
3
- describe Sashite::GGN::Ally do
4
- subject { Sashite::GGN::Ally }
5
-
6
- describe '.load' do
7
- describe 'boolean' do
8
- before do
9
- @ggn_obj = 't'
10
- end
11
-
12
- it 'loads a document from the current io stream' do
13
- subject.load(@ggn_obj).must_equal true
14
- end
15
-
16
- it 'raises an error' do
17
- -> { subject.load 'true' }.must_raise ArgumentError
18
- end
19
- end
20
-
21
- describe 'null' do
22
- before do
23
- @ggn_obj = '_'
24
- end
25
-
26
- it 'loads a document from the current io stream' do
27
- subject.load(@ggn_obj).must_equal nil
28
- end
29
-
30
- it 'raises an error' do
31
- -> { subject.load '' }.must_raise ArgumentError
32
- end
33
- end
34
- end
35
- end
@@ -1,21 +0,0 @@
1
- require_relative '_test_helper'
2
-
3
- describe Sashite::GGN::Area do
4
- subject { Sashite::GGN::Area }
5
-
6
- describe '.load' do
7
- before do
8
- @ggn_obj = 'furthest_rank'
9
- end
10
-
11
- it 'loads a document from the current io stream' do
12
- subject.load(@ggn_obj).must_equal :furthest_rank
13
- end
14
-
15
- describe 'errors' do
16
- it 'raises without an area' do
17
- -> { subject.load 'foobar' }.must_raise ArgumentError
18
- end
19
- end
20
- end
21
- end
@@ -1,35 +0,0 @@
1
- require_relative '_test_helper'
2
-
3
- describe Sashite::GGN::Attacked do
4
- subject { Sashite::GGN::Attacked }
5
-
6
- describe '.load' do
7
- describe 'boolean' do
8
- before do
9
- @ggn_obj = 't'
10
- end
11
-
12
- it 'loads a document from the current io stream' do
13
- subject.load(@ggn_obj).must_equal true
14
- end
15
-
16
- it 'raises an error' do
17
- -> { subject.load 'true' }.must_raise ArgumentError
18
- end
19
- end
20
-
21
- describe 'null' do
22
- before do
23
- @ggn_obj = '_'
24
- end
25
-
26
- it 'loads a document from the current io stream' do
27
- subject.load(@ggn_obj).must_equal nil
28
- end
29
-
30
- it 'raises an error' do
31
- -> { subject.load '' }.must_raise ArgumentError
32
- end
33
- end
34
- end
35
- end
@@ -1,21 +0,0 @@
1
- require_relative '_test_helper'
2
-
3
- describe Sashite::GGN::Boolean do
4
- subject { Sashite::GGN::Boolean }
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::Digit do
4
- subject { Sashite::GGN::Digit }
5
-
6
- describe '.load' do
7
- before do
8
- @ggn_obj = '8'
9
- end
10
-
11
- it 'loads a document from the current io stream' do
12
- subject.load(@ggn_obj).must_equal 8
13
- end
14
-
15
- describe 'errors' do
16
- it 'raises with a negative integer' do
17
- -> { subject.load '-4' }.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::DigitExcludingZero do
4
- subject { Sashite::GGN::DigitExcludingZero }
5
-
6
- describe '.load' do
7
- before do
8
- @ggn_obj = '8'
9
- end
10
-
11
- it 'loads a document from the current io stream' do
12
- subject.load(@ggn_obj).must_equal 8
13
- end
14
-
15
- describe 'errors' do
16
- it 'raises with zero' do
17
- -> { subject.load '0' }.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::Direction do
4
- subject { Sashite::GGN::Direction }
5
-
6
- describe '.load' do
7
- before do
8
- @ggn_obj = '0,1,2,3,4'
9
- end
10
-
11
- it 'loads a document from the current io stream' do
12
- subject.load(@ggn_obj).must_equal [ 0, 1, 2, 3, 4 ]
13
- end
14
-
15
- describe 'errors' do
16
- it 'raises without integers' do
17
- -> { subject.load '4,bar' }.must_raise ArgumentError
18
- end
19
- end
20
- end
21
- end
@@ -1,555 +0,0 @@
1
- require_relative '_test_helper'
2
-
3
- describe Sashite::GGN::GameplayIntoBase64 do
4
- subject { Sashite::GGN::GameplayIntoBase64 }
5
-
6
- describe '.load' do
7
- before do
8
- @ggn_obj = 'dDxzZWxmPl8mX15yZW1vdmVbLTEsMF0xL3Q9X0BmK2FsbH5fQGFuX2VuZW15X2FjdG9yK2FsbCVzZWxm' +
9
- 'LiB0PHNlbGY+XyZfXnJlbW92ZVswLC0xXTEvdD1fQGYrYWxsfl9AYW5fZW5lbXlfYWN0b3IrYWxsJXNl' +
10
- 'bGYuIHQ8c2VsZj5fJl9ecmVtb3ZlWzAsMV0xL3Q9X0BmK2FsbH5fQGFuX2VuZW15X2FjdG9yK2FsbCVz' +
11
- 'ZWxmLiB0PHNlbGY+XyZfXnJlbW92ZVsxLDBdMS90PV9AZithbGx+X0Bhbl9lbmVteV9hY3RvcithbGwl' +
12
- 'c2VsZi4gdDxzZWxmPl8mX15zaGlmdFstMSwwXV8vdD1fQGYrYWxsfl9AZithbGwlc2VsZi4gdDxzZWxm' +
13
- 'Pl8mX15zaGlmdFstMSwwXV8vdD1fQGYrYWxsfl9AZithbGwlc2VsZjsgdDxzZWxmPl8mX15yZW1vdmVb' +
14
- 'LTEsMF0xL3Q9X0BmK2FsbH5fQGFuX2VuZW15X2FjdG9yK2FsbCVzZWxmLiB0PHNlbGY+XyZfXnNoaWZ0' +
15
- 'WzAsLTFdXy90PV9AZithbGx+X0BmK2FsbCVzZWxmLiB0PHNlbGY+XyZfXnNoaWZ0WzAsLTFdXy90PV9A' +
16
- 'ZithbGx+X0BmK2FsbCVzZWxmOyB0PHNlbGY+XyZfXnJlbW92ZVswLC0xXTEvdD1fQGYrYWxsfl9AYW5f' +
17
- 'ZW5lbXlfYWN0b3IrYWxsJXNlbGYuIHQ8c2VsZj5fJl9ec2hpZnRbMCwxXV8vdD1fQGYrYWxsfl9AZith' +
18
- 'bGwlc2VsZi4gdDxzZWxmPl8mX15zaGlmdFswLDFdXy90PV9AZithbGx+X0BmK2FsbCVzZWxmOyB0PHNl' +
19
- 'bGY+XyZfXnJlbW92ZVswLDFdMS90PV9AZithbGx+X0Bhbl9lbmVteV9hY3RvcithbGwlc2VsZi4gdDxz' +
20
- 'ZWxmPl8mX15zaGlmdFsxLDBdXy90PV9AZithbGx+X0BmK2FsbCVzZWxmLiB0PHNlbGY+XyZfXnNoaWZ0' +
21
- 'WzEsMF1fL3Q9X0BmK2FsbH5fQGYrYWxsJXNlbGY7IHQ8c2VsZj5fJl9ecmVtb3ZlWzEsMF0xL3Q9X0Bm' +
22
- 'K2FsbH5fQGFuX2VuZW15X2FjdG9yK2FsbCVzZWxmLg=='
23
- end
24
-
25
- it 'loads a document from the current io stream' do
26
- subject.load(@ggn_obj).hash.must_equal [
27
- [
28
- {
29
- :"subject" => {
30
- :"...ally?" => true,
31
- :"actor" => :self,
32
- :"state" => {
33
- :"...last_moved_actor?" => nil,
34
- :"...previous_moves_counter" => nil
35
- }
36
- },
37
-
38
- :"verb" => {
39
- :"name" => :remove,
40
- :"vector" => {:"...maximum_magnitude" => 1, direction: [-1,0]}
41
- },
42
-
43
- :"object" => {
44
- :"src_square" => {
45
- :"...attacked?" => nil,
46
- :"...occupied!" => false,
47
- :"area" => :all
48
- },
49
- :"dst_square" => {
50
- :"...attacked?" => nil,
51
- :"...occupied!" => :an_enemy_actor,
52
- :"area" => :all
53
- },
54
- :"promotable_into_actors" => [:self]
55
- }
56
- }
57
- ],
58
-
59
-
60
-
61
- [
62
- {
63
- :"subject" => {
64
- :"...ally?" => true,
65
- :"actor" => :self,
66
- :"state" => {
67
- :"...last_moved_actor?" => nil,
68
- :"...previous_moves_counter" => nil
69
- }
70
- },
71
-
72
- :"verb" => {
73
- :"name" => :remove,
74
- :"vector" => {:"...maximum_magnitude" => 1, direction: [0,-1]}
75
- },
76
-
77
- :"object" => {
78
- :"src_square" => {
79
- :"...attacked?" => nil,
80
- :"...occupied!" => false,
81
- :"area" => :all
82
- },
83
- :"dst_square" => {
84
- :"...attacked?" => nil,
85
- :"...occupied!" => :an_enemy_actor,
86
- :"area" => :all
87
- },
88
- :"promotable_into_actors" => [:self]
89
- }
90
- }
91
- ],
92
-
93
-
94
-
95
- [
96
- {
97
- :"subject" => {
98
- :"...ally?" => true,
99
- :"actor" => :self,
100
- :"state" => {
101
- :"...last_moved_actor?" => nil,
102
- :"...previous_moves_counter" => nil
103
- }
104
- },
105
-
106
- :"verb" => {
107
- :"name" => :remove,
108
- :"vector" => {:"...maximum_magnitude" => 1, direction: [0,1]}
109
- },
110
-
111
- :"object" => {
112
- :"src_square" => {
113
- :"...attacked?" => nil,
114
- :"...occupied!" => false,
115
- :"area" => :all
116
- },
117
- :"dst_square" => {
118
- :"...attacked?" => nil,
119
- :"...occupied!" => :an_enemy_actor,
120
- :"area" => :all
121
- },
122
- :"promotable_into_actors" => [:self]
123
- }
124
- }
125
- ],
126
-
127
-
128
-
129
- [
130
- {
131
- :"subject" => {
132
- :"...ally?" => true,
133
- :"actor" => :self,
134
- :"state" => {
135
- :"...last_moved_actor?" => nil,
136
- :"...previous_moves_counter" => nil
137
- }
138
- },
139
-
140
- :"verb" => {
141
- :"name" => :remove,
142
- :"vector" => {:"...maximum_magnitude" => 1, direction: [1,0]}
143
- },
144
-
145
- :"object" => {
146
- :"src_square" => {
147
- :"...attacked?" => nil,
148
- :"...occupied!" => false,
149
- :"area" => :all
150
- },
151
- :"dst_square" => {
152
- :"...attacked?" => nil,
153
- :"...occupied!" => :an_enemy_actor,
154
- :"area" => :all
155
- },
156
- :"promotable_into_actors" => [:self]
157
- }
158
- }
159
- ],
160
-
161
-
162
-
163
- [
164
- {
165
- :"subject" => {
166
- :"...ally?" => true,
167
- :"actor" => :self,
168
- :"state" => {
169
- :"...last_moved_actor?" => nil,
170
- :"...previous_moves_counter" => nil
171
- }
172
- },
173
-
174
- :"verb" => {
175
- :"name" => :shift,
176
- :"vector" => {:"...maximum_magnitude" => nil, direction: [-1,0]}
177
- },
178
-
179
- :"object" => {
180
- :"src_square" => {
181
- :"...attacked?" => nil,
182
- :"...occupied!" => false,
183
- :"area" => :all
184
- },
185
- :"dst_square" => {
186
- :"...attacked?" => nil,
187
- :"...occupied!" => false,
188
- :"area" => :all
189
- },
190
- :"promotable_into_actors" => [:self]
191
- }
192
- }
193
- ],
194
-
195
-
196
-
197
- [
198
- {
199
- :"subject" => {
200
- :"...ally?" => true,
201
- :"actor" => :self,
202
- :"state" => {
203
- :"...last_moved_actor?" => nil,
204
- :"...previous_moves_counter" => nil
205
- }
206
- },
207
-
208
- :"verb" => {
209
- :"name" => :shift,
210
- :"vector" => {:"...maximum_magnitude" => nil, direction: [-1,0]}
211
- },
212
-
213
- :"object" => {
214
- :"src_square" => {
215
- :"...attacked?" => nil,
216
- :"...occupied!" => false,
217
- :"area" => :all
218
- },
219
- :"dst_square" => {
220
- :"...attacked?" => nil,
221
- :"...occupied!" => false,
222
- :"area" => :all
223
- },
224
- :"promotable_into_actors" => [:self]
225
- }
226
- },
227
- {
228
- :"subject" => {
229
- :"...ally?" => true,
230
- :"actor" => :self,
231
- :"state" => {
232
- :"...last_moved_actor?" => nil,
233
- :"...previous_moves_counter" => nil
234
- }
235
- },
236
-
237
- :"verb" => {
238
- :"name" => :remove,
239
- :"vector" => {:"...maximum_magnitude" => 1, direction: [-1,0]}
240
- },
241
-
242
- :"object" => {
243
- :"src_square" => {
244
- :"...attacked?" => nil,
245
- :"...occupied!" => false,
246
- :"area" => :all
247
- },
248
- :"dst_square" => {
249
- :"...attacked?" => nil,
250
- :"...occupied!" => :an_enemy_actor,
251
- :"area" => :all
252
- },
253
- :"promotable_into_actors" => [:self]
254
- }
255
- }
256
- ],
257
-
258
-
259
-
260
- [
261
- {
262
- :"subject" => {
263
- :"...ally?" => true,
264
- :"actor" => :self,
265
- :"state" => {
266
- :"...last_moved_actor?" => nil,
267
- :"...previous_moves_counter" => nil
268
- }
269
- },
270
-
271
- :"verb" => {
272
- :"name" => :shift,
273
- :"vector" => {:"...maximum_magnitude" => nil, direction: [0,-1]}
274
- },
275
-
276
- :"object" => {
277
- :"src_square" => {
278
- :"...attacked?" => nil,
279
- :"...occupied!" => false,
280
- :"area" => :all
281
- },
282
- :"dst_square" => {
283
- :"...attacked?" => nil,
284
- :"...occupied!" => false,
285
- :"area" => :all
286
- },
287
- :"promotable_into_actors" => [:self]
288
- }
289
- }
290
- ],
291
-
292
-
293
-
294
- [
295
- {
296
- :"subject" => {
297
- :"...ally?" => true,
298
- :"actor" => :self,
299
- :"state" => {
300
- :"...last_moved_actor?" => nil,
301
- :"...previous_moves_counter" => nil
302
- }
303
- },
304
-
305
- :"verb" => {
306
- :"name" => :shift,
307
- :"vector" => {:"...maximum_magnitude" => nil, direction: [0,-1]}
308
- },
309
-
310
- :"object" => {
311
- :"src_square" => {
312
- :"...attacked?" => nil,
313
- :"...occupied!" => false,
314
- :"area" => :all
315
- },
316
- :"dst_square" => {
317
- :"...attacked?" => nil,
318
- :"...occupied!" => false,
319
- :"area" => :all
320
- },
321
- :"promotable_into_actors" => [:self]
322
- }
323
- },
324
- {
325
- :"subject" => {
326
- :"...ally?" => true,
327
- :"actor" => :self,
328
- :"state" => {
329
- :"...last_moved_actor?" => nil,
330
- :"...previous_moves_counter" => nil
331
- }
332
- },
333
-
334
- :"verb" => {
335
- :"name" => :remove,
336
- :"vector" => {:"...maximum_magnitude" => 1, direction: [0,-1]}
337
- },
338
-
339
- :"object" => {
340
- :"src_square" => {
341
- :"...attacked?" => nil,
342
- :"...occupied!" => false,
343
- :"area" => :all
344
- },
345
- :"dst_square" => {
346
- :"...attacked?" => nil,
347
- :"...occupied!" => :an_enemy_actor,
348
- :"area" => :all
349
- },
350
- :"promotable_into_actors" => [:self]
351
- }
352
- }
353
- ],
354
-
355
-
356
-
357
- [
358
- {
359
- :"subject" => {
360
- :"...ally?" => true,
361
- :"actor" => :self,
362
- :"state" => {
363
- :"...last_moved_actor?" => nil,
364
- :"...previous_moves_counter" => nil
365
- }
366
- },
367
-
368
- :"verb" => {
369
- :"name" => :shift,
370
- :"vector" => {:"...maximum_magnitude" => nil, direction: [0,1]}
371
- },
372
-
373
- :"object" => {
374
- :"src_square" => {
375
- :"...attacked?" => nil,
376
- :"...occupied!" => false,
377
- :"area" => :all
378
- },
379
- :"dst_square" => {
380
- :"...attacked?" => nil,
381
- :"...occupied!" => false,
382
- :"area" => :all
383
- },
384
- :"promotable_into_actors" => [:self]
385
- }
386
- }
387
- ],
388
-
389
-
390
-
391
- [
392
- {
393
- :"subject" => {
394
- :"...ally?" => true,
395
- :"actor" => :self,
396
- :"state" => {
397
- :"...last_moved_actor?" => nil,
398
- :"...previous_moves_counter" => nil
399
- }
400
- },
401
-
402
- :"verb" => {
403
- :"name" => :shift,
404
- :"vector" => {:"...maximum_magnitude" => nil, direction: [0,1]}
405
- },
406
-
407
- :"object" => {
408
- :"src_square" => {
409
- :"...attacked?" => nil,
410
- :"...occupied!" => false,
411
- :"area" => :all
412
- },
413
- :"dst_square" => {
414
- :"...attacked?" => nil,
415
- :"...occupied!" => false,
416
- :"area" => :all
417
- },
418
- :"promotable_into_actors" => [:self]
419
- }
420
- },
421
- {
422
- :"subject" => {
423
- :"...ally?" => true,
424
- :"actor" => :self,
425
- :"state" => {
426
- :"...last_moved_actor?" => nil,
427
- :"...previous_moves_counter" => nil
428
- }
429
- },
430
-
431
- :"verb" => {
432
- :"name" => :remove,
433
- :"vector" => {:"...maximum_magnitude" => 1, direction: [0,1]}
434
- },
435
-
436
- :"object" => {
437
- :"src_square" => {
438
- :"...attacked?" => nil,
439
- :"...occupied!" => false,
440
- :"area" => :all
441
- },
442
- :"dst_square" => {
443
- :"...attacked?" => nil,
444
- :"...occupied!" => :an_enemy_actor,
445
- :"area" => :all
446
- },
447
- :"promotable_into_actors" => [:self]
448
- }
449
- }
450
- ],
451
-
452
-
453
-
454
- [
455
- {
456
- :"subject" => {
457
- :"...ally?" => true,
458
- :"actor" => :self,
459
- :"state" => {
460
- :"...last_moved_actor?" => nil,
461
- :"...previous_moves_counter" => nil
462
- }
463
- },
464
-
465
- :"verb" => {
466
- :"name" => :shift,
467
- :"vector" => {:"...maximum_magnitude" => nil, direction: [1,0]}
468
- },
469
-
470
- :"object" => {
471
- :"src_square" => {
472
- :"...attacked?" => nil,
473
- :"...occupied!" => false,
474
- :"area" => :all
475
- },
476
- :"dst_square" => {
477
- :"...attacked?" => nil,
478
- :"...occupied!" => false,
479
- :"area" => :all
480
- },
481
- :"promotable_into_actors" => [:self]
482
- }
483
- }
484
- ],
485
-
486
-
487
-
488
- [
489
- {
490
- :"subject" => {
491
- :"...ally?" => true,
492
- :"actor" => :self,
493
- :"state" => {
494
- :"...last_moved_actor?" => nil,
495
- :"...previous_moves_counter" => nil
496
- }
497
- },
498
-
499
- :"verb" => {
500
- :"name" => :shift,
501
- :"vector" => {:"...maximum_magnitude" => nil, direction: [1,0]}
502
- },
503
-
504
- :"object" => {
505
- :"src_square" => {
506
- :"...attacked?" => nil,
507
- :"...occupied!" => false,
508
- :"area" => :all
509
- },
510
- :"dst_square" => {
511
- :"...attacked?" => nil,
512
- :"...occupied!" => false,
513
- :"area" => :all
514
- },
515
- :"promotable_into_actors" => [:self]
516
- }
517
- },
518
- {
519
- :"subject" => {
520
- :"...ally?" => true,
521
- :"actor" => :self,
522
- :"state" => {
523
- :"...last_moved_actor?" => nil,
524
- :"...previous_moves_counter" => nil
525
- }
526
- },
527
-
528
- :"verb" => {
529
- :"name" => :remove,
530
- :"vector" => {:"...maximum_magnitude" => 1, direction: [1,0]}
531
- },
532
-
533
- :"object" => {
534
- :"src_square" => {
535
- :"...attacked?" => nil,
536
- :"...occupied!" => false,
537
- :"area" => :all
538
- },
539
- :"dst_square" => {
540
- :"...attacked?" => nil,
541
- :"...occupied!" => :an_enemy_actor,
542
- :"area" => :all
543
- },
544
- :"promotable_into_actors" => [:self]
545
- }
546
- }
547
- ]
548
- ].hash
549
- end
550
-
551
- it 'raises an error' do
552
- -> { subject.load 'Zm9vYmFy' }.must_raise ArgumentError
553
- end
554
- end
555
- end