WorkSchedule

final case
class WorkSchedule[Actor, Context](id: BindingKey, worker: Worker[Actor, Context], jobStack: List[Job])

Represents an Actor's work schedule

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def currentJob: Option[Job]

Give the job currently being worked on

Give the job currently being worked on

Returns

Option[Job]

def destroy(): Outcome[WorkSchedule[Actor, Context]]

The significance of this function is that any local jobs are lost, but any global jobs are returned to the JobMarket.

The significance of this function is that any local jobs are lost, but any global jobs are returned to the JobMarket.

Returns

An Outcome of an empty work schedule of the same type.

def update(gameTime: GameTime, dice: Dice, actor: Actor, context: Context): GlobalEvent => Outcome[WorkProgressReport[Actor, Context]]

When supplied with a global event, creates an outcome of the updated work schedule.

When supplied with a global event, creates an outcome of the updated work schedule.

The update function coordinates all of the work for this worker, creating work, finding jobs, working on tasks etc.

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product