WorkSchedule

indigoextras.jobs.WorkSchedule
See theWorkSchedule companion object
final case class WorkSchedule[Actor, Context](id: BindingKey, worker: Worker[Actor, Context], jobStack: List[Job])

Represents an Actor's work schedule

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def currentJob: Option[Job]

Give the job currently being worked on

Give the job currently being worked on

Attributes

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.

Attributes

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.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product