Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

slight performance improvement

  • Loading branch information...
commit c78481b623e043c038907315861700a10e9d6ff6 1 parent 0056ae8
david karapetyan authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 players/davidk.rb
View
5 players/davidk.rb
@@ -4,8 +4,9 @@ def to_s
end
def move
- if stats[:health] >= 50 && !killable_opponent.nil?
- [:attack, killable_opponent]
+ opponent = killable_opponent
+ if stats[:health] >= 50 && !opponent.nil?
+ [:attack, opponent]
else
[:rest]
end
Please sign in to comment.
Something went wrong with that request. Please try again.