Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #32 from jackdoe/master

start a Horde fraction
  • Loading branch information...
commit 2c924df697c109419f9e4e9baaa9641478a3033f 2 parents e23f463 + c6eacc7
@reedlaw reedlaw authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 players/jack.rb
View
5 players/jack.rb
@@ -1,6 +1,9 @@
module Jack
+ def horde
+ true
+ end
def move
- enemy = Game.world[:players].select{ |p| p != self && p.alive }.min { |a,b| a.stats[:health] <=> b.stats[:health] }
+ enemy = Game.world[:players].select { |p| !p.horde && p.alive }.min { |a,b| a.stats[:health] <=> b.stats[:health] }
if enemy && self.stats[:health] > self.stats[:strength]
[:attack,enemy]
else
Please sign in to comment.
Something went wrong with that request. Please try again.