Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add distance_of ability #21

Closed
ryanb opened this Issue Jan 3, 2010 · 1 comment

Comments

Projects
None yet
1 participant
Owner

ryanb commented Jan 3, 2010

The warrior should be able to tell the distance of a given unit. This will help in bomb throwing to tell if a captive or ticking unit will be effected by the bomb.

captives = warrior.listen.map { |s| s.captive? }
warrior.throw! unless captives.any? { |s| warrior.distance_of(s) == 3 }
Owner

ryanb commented Jan 3, 2010

adding distance_of ability - closed by c44b6ba

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment