Class: Worker

HungryGames~Simulator~ Worker


new Worker(sim [, retries])

Asyncronous worker that does the actual simulating.
Parameters:
Name Type Argument Default Description
sim Object Simulation data.
retries number <optional>
2 Number of remaining times to retry in the event of an error.
Source:

Methods


<private> _simulate(sim, retries)

Run the simulation.
Parameters:
Name Type Description
sim Object Simulation data.
retries number Number of remaining times to retry in the event of an error.
Source:

cb( [data])

Pass a message back to the parent.
Parameters:
Name Type Argument Description
data * <optional>
Data to send to the parent.
Source: