Skip to content

Commit

Permalink
Fixed retreats calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessOne committed Jul 4, 2013
1 parent f93e2d5 commit 7cf83ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/adjudicator/state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def set_area_unit(area, unit)
def apply_orders!(orders)
orders.each do |order|
if Move === order && order.succeeded?
@retreats[order.dst] = area_unit(order.dst)
if (dislodged_unit = area_unit(order.dst))
@retreats[order.dst] = area_unit(order.dst)
end

set_area_unit(order.dst, area_unit(order.unit_area))
set_area_unit(order.unit_area, nil)
Expand Down

0 comments on commit 7cf83ca

Please sign in to comment.