berlin-ai 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/ai/fake.rb +3 -3
  2. data/lib/version.rb +1 -1
  3. metadata +1 -1
data/lib/ai/fake.rb CHANGED
@@ -95,7 +95,7 @@ module Berlin
95
95
 
96
96
  node.adjacent_nodes.each do |adj|
97
97
  num = rand(0...soldiers)
98
- game.add_move(node.id, adj.id, num)
98
+ game.add_move(node, adj, num)
99
99
  soldiers -= num
100
100
  end
101
101
  end
@@ -294,13 +294,13 @@ class Berlin::Fake::Game
294
294
  info = {'current_turn' => @turn}
295
295
 
296
296
  @ai_games.each do |game|
297
- game.clear_moves
297
+ game.reset!
298
298
  game.update(info, @state.as_json)
299
299
  Berlin::Fake::Random.on_turn(game)
300
300
  end
301
301
 
302
302
  @player_game.update(info, @state.as_json)
303
- @player_game.clear_moves
303
+ @player_game.reset!
304
304
  Berlin::AI::Player.on_turn(@player_game)
305
305
  end
306
306
  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 = 28
5
+ BUILD = 29
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.28
4
+ version: 0.0.29
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: