Skip to content

Commit

Permalink
tuck that call safely away
Browse files Browse the repository at this point in the history
  • Loading branch information
jaythomas committed Sep 7, 2014
1 parent c786084 commit fee486d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion brawl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,7 @@ def bot_move
a.unshift(players.shuffle.select { |e| e != p }.first.user.to_s)
debug "Bot's playing #{a.join(' ')} "
play_move(a)
bot_thread_move if cards.first.type == :disaster
else
a = Array.new(p.cards.length) { |i| i + 1 }
# Don't discard the first card
Expand All @@ -1303,7 +1304,6 @@ def bot_move
debug "Bot's discarding #{a.join(' ')}"
discard(a)
end
bot_thread_move if cards.first.type == :disaster
end

def bot_counter
Expand Down
2 changes: 1 addition & 1 deletion junkyard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ def bot_move
a.unshift(players.shuffle.select { |e| e != p }.first.user.to_s)
debug "Bot's playing #{a.join(' ')} "
play_move(a)
bot_thread_move if cards.first.type == :disaster
else
a = Array.new(p.cards.length) { |i| i + 1 }
# Don't discard the first card
Expand All @@ -968,7 +969,6 @@ def bot_move
debug "Bot's discarding #{a.join(' ')}"
discard(a)
end
bot_thread_move if cards.first.type == :disaster
end

def bot_counter
Expand Down
2 changes: 1 addition & 1 deletion rumble.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ def bot_move
a.unshift(players.shuffle.select { |e| e != p }.first.user.to_s)
debug "Bot's playing #{a.join(' ')} "
play_move(a)
bot_thread_move if cards.first.type == :disaster
else
a = Array.new(p.cards.length) { |i| i + 1 }
# Don't discard the first card
Expand All @@ -1152,7 +1153,6 @@ def bot_move
debug "Bot's discarding #{a.join(' ')}"
discard(a)
end
bot_thread_move if cards.first.type == :disaster
end

def bot_counter
Expand Down

0 comments on commit fee486d

Please sign in to comment.