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.
- data/lib/ai/fake.rb +3 -3
- data/lib/version.rb +1 -1
- 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
|
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.
|
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.
|
303
|
+
@player_game.reset!
|
304
304
|
Berlin::AI::Player.on_turn(@player_game)
|
305
305
|
end
|
306
306
|
end
|
data/lib/version.rb
CHANGED