berlin-ai 0.0.36 → 0.0.37

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- berlin-ai (0.0.29)
4
+ berlin-ai (0.0.33)
5
5
  rainbow (~> 1.1.4)
6
6
  sinatra (= 1.4.3)
7
7
  sinatra-contrib (= 1.4.1)
@@ -17,7 +17,7 @@ GEM
17
17
  eventmachine (1.0.3)
18
18
  method_source (0.8.2)
19
19
  minitest (4.7.5)
20
- multi_json (1.7.9)
20
+ multi_json (1.8.0)
21
21
  pry (0.9.12.2)
22
22
  coderay (~> 1.0.5)
23
23
  method_source (~> 0.8)
@@ -21,7 +21,7 @@ module Berlin
21
21
  # the node and how many soldiers there is. We'll get back to that later.
22
22
  # map['nodes'] => [{:id => STRING}, ...]
23
23
  data['nodes'].each do |node|
24
- node_data = node.merge(types[node['type']]).merge(:map => map)
24
+ node_data = node.merge(types[node['type']]).merge('map' => map)
25
25
  map.nodes_hash[node['id']] = Berlin::AI::Node.parse(node_data)
26
26
  end
27
27
 
@@ -6,10 +6,11 @@ module Berlin
6
6
  def parse(data)
7
7
  node = Node.new
8
8
 
9
- node.id = data['id']
10
- node.type = data['type']
11
- node.points = data['points']
12
- node.soldiers_per_turn = data['soldiers_per_turn']
9
+ node.id = data.fetch('id')
10
+ node.map = data.fetch('map')
11
+ node.type = data.fetch('type')
12
+ node.points = data.fetch('points')
13
+ node.soldiers_per_turn = data.fetch('soldiers_per_turn')
13
14
 
14
15
  node
15
16
  end
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Berlin
2
2
  module AI
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- BUILD = 36
5
+ BUILD = 37
6
6
 
7
7
  VERSION = "#{MAJOR}.#{MINOR}.#{BUILD}"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berlin-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.36
4
+ version: 0.0.37
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: