Added FriendlyHash for orders, refactored Order#execute arguments

This commit is contained in:
2019-10-03 11:45:58 -05:00
parent 3dd067612a
commit fd3b847449
6 changed files with 78 additions and 10 deletions

View File

@@ -32,9 +32,12 @@ class IMICRTS
@players.find { |player| player.id == id }
end
def issue_order(player_id, order_id, *args)
# pp Order.order_name(order_id)
# pp args
def issue_order(order_id, *args)
if order = Order.get(order_id)
order.execute(self, *args)
else
raise "Undefined order: #{Order.order_name(order_id)}"
end
end