sashite-ggn 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +3 -0
  5. data/Gemfile +2 -0
  6. data/LICENSE.md +22 -0
  7. data/README.md +566 -0
  8. data/Rakefile +7 -0
  9. data/VERSION.semver +1 -0
  10. data/lib/sashite-ggn.rb +1 -0
  11. data/lib/sashite/ggn.rb +9 -0
  12. data/lib/sashite/ggn/ability.rb +37 -0
  13. data/lib/sashite/ggn/actor.rb +28 -0
  14. data/lib/sashite/ggn/ally.rb +28 -0
  15. data/lib/sashite/ggn/area.rb +25 -0
  16. data/lib/sashite/ggn/attacked.rb +28 -0
  17. data/lib/sashite/ggn/boolean.rb +25 -0
  18. data/lib/sashite/ggn/digit.rb +28 -0
  19. data/lib/sashite/ggn/digit_excluding_zero.rb +25 -0
  20. data/lib/sashite/ggn/direction.rb +27 -0
  21. data/lib/sashite/ggn/gameplay.rb +40 -0
  22. data/lib/sashite/ggn/gameplay_into_base64.rb +28 -0
  23. data/lib/sashite/ggn/integer.rb +28 -0
  24. data/lib/sashite/ggn/last_moved_actor.rb +28 -0
  25. data/lib/sashite/ggn/maximum_magnitude.rb +28 -0
  26. data/lib/sashite/ggn/name.rb +25 -0
  27. data/lib/sashite/ggn/negative_integer.rb +27 -0
  28. data/lib/sashite/ggn/null.rb +23 -0
  29. data/lib/sashite/ggn/object.rb +36 -0
  30. data/lib/sashite/ggn/occupied.rb +37 -0
  31. data/lib/sashite/ggn/pattern.rb +29 -0
  32. data/lib/sashite/ggn/previous_moves_counter.rb +28 -0
  33. data/lib/sashite/ggn/promotable_into_actors.rb +32 -0
  34. data/lib/sashite/ggn/required.rb +27 -0
  35. data/lib/sashite/ggn/self.rb +23 -0
  36. data/lib/sashite/ggn/square.rb +37 -0
  37. data/lib/sashite/ggn/state.rb +34 -0
  38. data/lib/sashite/ggn/subject.rb +37 -0
  39. data/lib/sashite/ggn/unsigned_integer.rb +28 -0
  40. data/lib/sashite/ggn/unsigned_integer_excluding_zero.rb +28 -0
  41. data/lib/sashite/ggn/verb.rb +42 -0
  42. data/lib/sashite/ggn/zero.rb +23 -0
  43. data/sashite-ggn.gemspec +21 -0
  44. data/test/_test_helper.rb +2 -0
  45. data/test/test_ggn.rb +546 -0
  46. data/test/test_ggn_ability.rb +51 -0
  47. data/test/test_ggn_actor.rb +591 -0
  48. data/test/test_ggn_ally.rb +51 -0
  49. data/test/test_ggn_area.rb +79 -0
  50. data/test/test_ggn_attacked.rb +51 -0
  51. data/test/test_ggn_boolean.rb +37 -0
  52. data/test/test_ggn_digit.rb +21 -0
  53. data/test/test_ggn_digit_excluding_zero.rb +22 -0
  54. data/test/test_ggn_direction.rb +21 -0
  55. data/test/test_ggn_gameplay.rb +573 -0
  56. data/test/test_ggn_gameplay_into_base64.rb +545 -0
  57. data/test/test_ggn_integer.rb +41 -0
  58. data/test/test_ggn_last_moved_actor.rb +51 -0
  59. data/test/test_ggn_maximum_magnitude.rb +37 -0
  60. data/test/test_ggn_name.rb +51 -0
  61. data/test/test_ggn_negative_integer.rb +21 -0
  62. data/test/test_ggn_null.rb +21 -0
  63. data/test/test_ggn_object.rb +35 -0
  64. data/test/test_ggn_occupied.rb +102 -0
  65. data/test/test_ggn_pattern.rb +82 -0
  66. data/test/test_ggn_previous_moves_counter.rb +41 -0
  67. data/test/test_ggn_promotable_into_actors.rb +598 -0
  68. data/test/test_ggn_required.rb +37 -0
  69. data/test/test_ggn_self.rb +21 -0
  70. data/test/test_ggn_square.rb +27 -0
  71. data/test/test_ggn_state.rb +28 -0
  72. data/test/test_ggn_subject.rb +30 -0
  73. data/test/test_ggn_unsigned_integer.rb +21 -0
  74. data/test/test_ggn_unsigned_integer_excluding_zero.rb +21 -0
  75. data/test/test_ggn_verb.rb +26 -0
  76. data/test/test_ggn_zero.rb +21 -0
  77. metadata +208 -0
@@ -0,0 +1,28 @@
1
+ require_relative 'digit'
2
+ require_relative 'digit_excluding_zero'
3
+
4
+ module Sashite
5
+ module GGN
6
+ class UnsignedIntegerExcludingZero
7
+ PATTERN = /#{DigitExcludingZero::PATTERN}#{Digit::PATTERN}*/
8
+
9
+ def self.valid? str
10
+ !!str.match("^#{PATTERN}$")
11
+ end
12
+
13
+ def initialize str
14
+ raise ArgumentError unless self.class.valid? str
15
+
16
+ @value = str.to_i
17
+ end
18
+
19
+ def as_json
20
+ @value
21
+ end
22
+
23
+ def to_s
24
+ @value.to_s
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,42 @@
1
+ require_relative 'name'
2
+ require_relative 'direction'
3
+ require_relative 'maximum_magnitude'
4
+ require_relative 'required'
5
+
6
+ module Sashite
7
+ module GGN
8
+ class Verb
9
+ PATTERN = /#{Name::PATTERN}\[#{Direction::PATTERN}\]#{MaximumMagnitude::PATTERN}\/#{Required::PATTERN}/
10
+
11
+ def self.valid? str
12
+ !!str.match("^#{PATTERN}$")
13
+ end
14
+
15
+ attr_reader :name, :direction, :maximum_magnitude, :required
16
+
17
+ def initialize str
18
+ raise ArgumentError unless self.class.valid? str
19
+
20
+ @name = Name.new str.split('[').fetch 0
21
+ @direction = Direction.new str.split('[').fetch(1).split(']').fetch 0
22
+ @maximum_magnitude = MaximumMagnitude.new str.split(']').fetch(1).split('/').fetch 0
23
+ @required = Required.new str.split('/').fetch 1
24
+ end
25
+
26
+ def as_json
27
+ {
28
+ name: @name.as_json,
29
+ vector: {:"...maximum_magnitude" => @maximum_magnitude.as_json, direction: @direction.as_json}
30
+ }
31
+ end
32
+
33
+ def to_s
34
+ "#{@name}[#{@direction}]#{@maximum_magnitude}/#{@required}"
35
+ end
36
+
37
+ def dimensions
38
+ @direction.as_json.size
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,23 @@
1
+ require 'singleton'
2
+
3
+ module Sashite
4
+ module GGN
5
+ class Zero
6
+ include Singleton
7
+
8
+ PATTERN = /0/
9
+
10
+ def self.valid? str
11
+ !!str.match("^#{PATTERN}$")
12
+ end
13
+
14
+ def as_json
15
+ 0
16
+ end
17
+
18
+ def to_s
19
+ '0'
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,21 @@
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{A Ruby GGN parser.}
7
+ spec.description = %q{Ruby implementation of General Gameplay Notation.}
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_dependency 'sashite-cgh', '~> 0.0.1'
17
+
18
+ spec.add_development_dependency 'bundler', '~> 1.6'
19
+ spec.add_development_dependency 'minitest', '~> 5'
20
+ spec.add_development_dependency 'rake', '~> 10'
21
+ end
@@ -0,0 +1,2 @@
1
+ require 'sashite/ggn'
2
+ require 'minitest/autorun'
data/test/test_ggn.rb ADDED
@@ -0,0 +1,546 @@
1
+ require_relative '_test_helper'
2
+
3
+ describe Sashite::GGN do
4
+ describe '.load' do
5
+ it 'loads a GGN string' do
6
+ Sashite::GGN.load(
7
+ 't<self>_&_^remove[-1,0]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
8
+ 't<self>_&_^remove[0,-1]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
9
+ 't<self>_&_^remove[0,1]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
10
+ 't<self>_&_^remove[1,0]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
11
+ 't<self>_&_^shift[-1,0]_/t=_@f+all~_@f+all%self. ' +
12
+ 't<self>_&_^shift[-1,0]_/t=_@f+all~_@f+all%self; t<self>_&_^remove[-1,0]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
13
+ 't<self>_&_^shift[0,-1]_/t=_@f+all~_@f+all%self. ' +
14
+ 't<self>_&_^shift[0,-1]_/t=_@f+all~_@f+all%self; t<self>_&_^remove[0,-1]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
15
+ 't<self>_&_^shift[0,1]_/t=_@f+all~_@f+all%self. ' +
16
+ 't<self>_&_^shift[0,1]_/t=_@f+all~_@f+all%self; t<self>_&_^remove[0,1]1/t=_@f+all~_@an_enemy_actor+all%self. ' +
17
+ 't<self>_&_^shift[1,0]_/t=_@f+all~_@f+all%self. ' +
18
+ 't<self>_&_^shift[1,0]_/t=_@f+all~_@f+all%self; t<self>_&_^remove[1,0]1/t=_@f+all~_@an_enemy_actor+all%self.').
19
+ as_json.hash.must_equal(
20
+ [
21
+ [
22
+ {
23
+ :"subject" => {
24
+ :"...ally?" => true,
25
+ :"actor" => :self,
26
+ :"state" => {
27
+ :"...last_moved_actor?" => nil,
28
+ :"...previous_moves_counter" => nil
29
+ }
30
+ },
31
+
32
+ :"verb" => {
33
+ :"name" => :remove,
34
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [-1,0]}
35
+ },
36
+
37
+ :"object" => {
38
+ :"src_square" => {
39
+ :"...attacked?" => nil,
40
+ :"...occupied!" => false,
41
+ :"area" => :all
42
+ },
43
+ :"dst_square" => {
44
+ :"...attacked?" => nil,
45
+ :"...occupied!" => :an_enemy_actor,
46
+ :"area" => :all
47
+ },
48
+ :"promotable_into_actors" => [:self]
49
+ }
50
+ }
51
+ ],
52
+
53
+
54
+
55
+ [
56
+ {
57
+ :"subject" => {
58
+ :"...ally?" => true,
59
+ :"actor" => :self,
60
+ :"state" => {
61
+ :"...last_moved_actor?" => nil,
62
+ :"...previous_moves_counter" => nil
63
+ }
64
+ },
65
+
66
+ :"verb" => {
67
+ :"name" => :remove,
68
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [0,-1]}
69
+ },
70
+
71
+ :"object" => {
72
+ :"src_square" => {
73
+ :"...attacked?" => nil,
74
+ :"...occupied!" => false,
75
+ :"area" => :all
76
+ },
77
+ :"dst_square" => {
78
+ :"...attacked?" => nil,
79
+ :"...occupied!" => :an_enemy_actor,
80
+ :"area" => :all
81
+ },
82
+ :"promotable_into_actors" => [:self]
83
+ }
84
+ }
85
+ ],
86
+
87
+
88
+
89
+ [
90
+ {
91
+ :"subject" => {
92
+ :"...ally?" => true,
93
+ :"actor" => :self,
94
+ :"state" => {
95
+ :"...last_moved_actor?" => nil,
96
+ :"...previous_moves_counter" => nil
97
+ }
98
+ },
99
+
100
+ :"verb" => {
101
+ :"name" => :remove,
102
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [0,1]}
103
+ },
104
+
105
+ :"object" => {
106
+ :"src_square" => {
107
+ :"...attacked?" => nil,
108
+ :"...occupied!" => false,
109
+ :"area" => :all
110
+ },
111
+ :"dst_square" => {
112
+ :"...attacked?" => nil,
113
+ :"...occupied!" => :an_enemy_actor,
114
+ :"area" => :all
115
+ },
116
+ :"promotable_into_actors" => [:self]
117
+ }
118
+ }
119
+ ],
120
+
121
+
122
+
123
+ [
124
+ {
125
+ :"subject" => {
126
+ :"...ally?" => true,
127
+ :"actor" => :self,
128
+ :"state" => {
129
+ :"...last_moved_actor?" => nil,
130
+ :"...previous_moves_counter" => nil
131
+ }
132
+ },
133
+
134
+ :"verb" => {
135
+ :"name" => :remove,
136
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [1,0]}
137
+ },
138
+
139
+ :"object" => {
140
+ :"src_square" => {
141
+ :"...attacked?" => nil,
142
+ :"...occupied!" => false,
143
+ :"area" => :all
144
+ },
145
+ :"dst_square" => {
146
+ :"...attacked?" => nil,
147
+ :"...occupied!" => :an_enemy_actor,
148
+ :"area" => :all
149
+ },
150
+ :"promotable_into_actors" => [:self]
151
+ }
152
+ }
153
+ ],
154
+
155
+
156
+
157
+ [
158
+ {
159
+ :"subject" => {
160
+ :"...ally?" => true,
161
+ :"actor" => :self,
162
+ :"state" => {
163
+ :"...last_moved_actor?" => nil,
164
+ :"...previous_moves_counter" => nil
165
+ }
166
+ },
167
+
168
+ :"verb" => {
169
+ :"name" => :shift,
170
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [-1,0]}
171
+ },
172
+
173
+ :"object" => {
174
+ :"src_square" => {
175
+ :"...attacked?" => nil,
176
+ :"...occupied!" => false,
177
+ :"area" => :all
178
+ },
179
+ :"dst_square" => {
180
+ :"...attacked?" => nil,
181
+ :"...occupied!" => false,
182
+ :"area" => :all
183
+ },
184
+ :"promotable_into_actors" => [:self]
185
+ }
186
+ }
187
+ ],
188
+
189
+
190
+
191
+ [
192
+ {
193
+ :"subject" => {
194
+ :"...ally?" => true,
195
+ :"actor" => :self,
196
+ :"state" => {
197
+ :"...last_moved_actor?" => nil,
198
+ :"...previous_moves_counter" => nil
199
+ }
200
+ },
201
+
202
+ :"verb" => {
203
+ :"name" => :shift,
204
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [-1,0]}
205
+ },
206
+
207
+ :"object" => {
208
+ :"src_square" => {
209
+ :"...attacked?" => nil,
210
+ :"...occupied!" => false,
211
+ :"area" => :all
212
+ },
213
+ :"dst_square" => {
214
+ :"...attacked?" => nil,
215
+ :"...occupied!" => false,
216
+ :"area" => :all
217
+ },
218
+ :"promotable_into_actors" => [:self]
219
+ }
220
+ },
221
+ {
222
+ :"subject" => {
223
+ :"...ally?" => true,
224
+ :"actor" => :self,
225
+ :"state" => {
226
+ :"...last_moved_actor?" => nil,
227
+ :"...previous_moves_counter" => nil
228
+ }
229
+ },
230
+
231
+ :"verb" => {
232
+ :"name" => :remove,
233
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [-1,0]}
234
+ },
235
+
236
+ :"object" => {
237
+ :"src_square" => {
238
+ :"...attacked?" => nil,
239
+ :"...occupied!" => false,
240
+ :"area" => :all
241
+ },
242
+ :"dst_square" => {
243
+ :"...attacked?" => nil,
244
+ :"...occupied!" => :an_enemy_actor,
245
+ :"area" => :all
246
+ },
247
+ :"promotable_into_actors" => [:self]
248
+ }
249
+ }
250
+ ],
251
+
252
+
253
+
254
+ [
255
+ {
256
+ :"subject" => {
257
+ :"...ally?" => true,
258
+ :"actor" => :self,
259
+ :"state" => {
260
+ :"...last_moved_actor?" => nil,
261
+ :"...previous_moves_counter" => nil
262
+ }
263
+ },
264
+
265
+ :"verb" => {
266
+ :"name" => :shift,
267
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [0,-1]}
268
+ },
269
+
270
+ :"object" => {
271
+ :"src_square" => {
272
+ :"...attacked?" => nil,
273
+ :"...occupied!" => false,
274
+ :"area" => :all
275
+ },
276
+ :"dst_square" => {
277
+ :"...attacked?" => nil,
278
+ :"...occupied!" => false,
279
+ :"area" => :all
280
+ },
281
+ :"promotable_into_actors" => [:self]
282
+ }
283
+ }
284
+ ],
285
+
286
+
287
+
288
+ [
289
+ {
290
+ :"subject" => {
291
+ :"...ally?" => true,
292
+ :"actor" => :self,
293
+ :"state" => {
294
+ :"...last_moved_actor?" => nil,
295
+ :"...previous_moves_counter" => nil
296
+ }
297
+ },
298
+
299
+ :"verb" => {
300
+ :"name" => :shift,
301
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [0,-1]}
302
+ },
303
+
304
+ :"object" => {
305
+ :"src_square" => {
306
+ :"...attacked?" => nil,
307
+ :"...occupied!" => false,
308
+ :"area" => :all
309
+ },
310
+ :"dst_square" => {
311
+ :"...attacked?" => nil,
312
+ :"...occupied!" => false,
313
+ :"area" => :all
314
+ },
315
+ :"promotable_into_actors" => [:self]
316
+ }
317
+ },
318
+ {
319
+ :"subject" => {
320
+ :"...ally?" => true,
321
+ :"actor" => :self,
322
+ :"state" => {
323
+ :"...last_moved_actor?" => nil,
324
+ :"...previous_moves_counter" => nil
325
+ }
326
+ },
327
+
328
+ :"verb" => {
329
+ :"name" => :remove,
330
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [0,-1]}
331
+ },
332
+
333
+ :"object" => {
334
+ :"src_square" => {
335
+ :"...attacked?" => nil,
336
+ :"...occupied!" => false,
337
+ :"area" => :all
338
+ },
339
+ :"dst_square" => {
340
+ :"...attacked?" => nil,
341
+ :"...occupied!" => :an_enemy_actor,
342
+ :"area" => :all
343
+ },
344
+ :"promotable_into_actors" => [:self]
345
+ }
346
+ }
347
+ ],
348
+
349
+
350
+
351
+ [
352
+ {
353
+ :"subject" => {
354
+ :"...ally?" => true,
355
+ :"actor" => :self,
356
+ :"state" => {
357
+ :"...last_moved_actor?" => nil,
358
+ :"...previous_moves_counter" => nil
359
+ }
360
+ },
361
+
362
+ :"verb" => {
363
+ :"name" => :shift,
364
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [0,1]}
365
+ },
366
+
367
+ :"object" => {
368
+ :"src_square" => {
369
+ :"...attacked?" => nil,
370
+ :"...occupied!" => false,
371
+ :"area" => :all
372
+ },
373
+ :"dst_square" => {
374
+ :"...attacked?" => nil,
375
+ :"...occupied!" => false,
376
+ :"area" => :all
377
+ },
378
+ :"promotable_into_actors" => [:self]
379
+ }
380
+ }
381
+ ],
382
+
383
+
384
+
385
+ [
386
+ {
387
+ :"subject" => {
388
+ :"...ally?" => true,
389
+ :"actor" => :self,
390
+ :"state" => {
391
+ :"...last_moved_actor?" => nil,
392
+ :"...previous_moves_counter" => nil
393
+ }
394
+ },
395
+
396
+ :"verb" => {
397
+ :"name" => :shift,
398
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [0,1]}
399
+ },
400
+
401
+ :"object" => {
402
+ :"src_square" => {
403
+ :"...attacked?" => nil,
404
+ :"...occupied!" => false,
405
+ :"area" => :all
406
+ },
407
+ :"dst_square" => {
408
+ :"...attacked?" => nil,
409
+ :"...occupied!" => false,
410
+ :"area" => :all
411
+ },
412
+ :"promotable_into_actors" => [:self]
413
+ }
414
+ },
415
+ {
416
+ :"subject" => {
417
+ :"...ally?" => true,
418
+ :"actor" => :self,
419
+ :"state" => {
420
+ :"...last_moved_actor?" => nil,
421
+ :"...previous_moves_counter" => nil
422
+ }
423
+ },
424
+
425
+ :"verb" => {
426
+ :"name" => :remove,
427
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [0,1]}
428
+ },
429
+
430
+ :"object" => {
431
+ :"src_square" => {
432
+ :"...attacked?" => nil,
433
+ :"...occupied!" => false,
434
+ :"area" => :all
435
+ },
436
+ :"dst_square" => {
437
+ :"...attacked?" => nil,
438
+ :"...occupied!" => :an_enemy_actor,
439
+ :"area" => :all
440
+ },
441
+ :"promotable_into_actors" => [:self]
442
+ }
443
+ }
444
+ ],
445
+
446
+
447
+
448
+ [
449
+ {
450
+ :"subject" => {
451
+ :"...ally?" => true,
452
+ :"actor" => :self,
453
+ :"state" => {
454
+ :"...last_moved_actor?" => nil,
455
+ :"...previous_moves_counter" => nil
456
+ }
457
+ },
458
+
459
+ :"verb" => {
460
+ :"name" => :shift,
461
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [1,0]}
462
+ },
463
+
464
+ :"object" => {
465
+ :"src_square" => {
466
+ :"...attacked?" => nil,
467
+ :"...occupied!" => false,
468
+ :"area" => :all
469
+ },
470
+ :"dst_square" => {
471
+ :"...attacked?" => nil,
472
+ :"...occupied!" => false,
473
+ :"area" => :all
474
+ },
475
+ :"promotable_into_actors" => [:self]
476
+ }
477
+ }
478
+ ],
479
+
480
+
481
+
482
+ [
483
+ {
484
+ :"subject" => {
485
+ :"...ally?" => true,
486
+ :"actor" => :self,
487
+ :"state" => {
488
+ :"...last_moved_actor?" => nil,
489
+ :"...previous_moves_counter" => nil
490
+ }
491
+ },
492
+
493
+ :"verb" => {
494
+ :"name" => :shift,
495
+ :"vector" => {:"...maximum_magnitude" => nil, direction: [1,0]}
496
+ },
497
+
498
+ :"object" => {
499
+ :"src_square" => {
500
+ :"...attacked?" => nil,
501
+ :"...occupied!" => false,
502
+ :"area" => :all
503
+ },
504
+ :"dst_square" => {
505
+ :"...attacked?" => nil,
506
+ :"...occupied!" => false,
507
+ :"area" => :all
508
+ },
509
+ :"promotable_into_actors" => [:self]
510
+ }
511
+ },
512
+ {
513
+ :"subject" => {
514
+ :"...ally?" => true,
515
+ :"actor" => :self,
516
+ :"state" => {
517
+ :"...last_moved_actor?" => nil,
518
+ :"...previous_moves_counter" => nil
519
+ }
520
+ },
521
+
522
+ :"verb" => {
523
+ :"name" => :remove,
524
+ :"vector" => {:"...maximum_magnitude" => 1, direction: [1,0]}
525
+ },
526
+
527
+ :"object" => {
528
+ :"src_square" => {
529
+ :"...attacked?" => nil,
530
+ :"...occupied!" => false,
531
+ :"area" => :all
532
+ },
533
+ :"dst_square" => {
534
+ :"...attacked?" => nil,
535
+ :"...occupied!" => :an_enemy_actor,
536
+ :"area" => :all
537
+ },
538
+ :"promotable_into_actors" => [:self]
539
+ }
540
+ }
541
+ ]
542
+ ].hash
543
+ )
544
+ end
545
+ end
546
+ end