Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
IDL 0.50 KB | None | 0 0
  1. module Worker
  2.   # Called by jobmanager
  3.   def assign_task(id, action, target, location)
  4.     @task_id = id
  5.     ...
  6.  
  7.     # Call the worker's movement/action code
  8.     # To join these, we can specify a block to be executed after the movement
  9.     #  is completed, which in this case would be the action code or nil if it's
  10.     #  just a movement
  11.   end
  12.  
  13.   # Called internally by the worker
  14.   def done_with_job
  15.     # Call into jobmanager, telling it you're done with @task_id
  16.  
  17.     @task_id = nil
  18.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement