ActionAlg

io.github.srs.model.entity.dynamicentity.action.ActionAlg
trait ActionAlg[F[_], E <: DynamicEntity]

ActionAlg trait defines the actions that can be performed on a dynamic entity.

It represents the algebra of actions that can be executed on a dynamic entity, such as, for example, moving the wheels.

Type parameters

E

the type of dynamic entity on which the action is performed, extending DynamicEntity.

F

the effect type of the action.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def moveWheels(e: E, leftSpeed: Double, rightSpeed: Double): F[E]

Moves the dynamic entity wheels with the specified speeds.

Moves the dynamic entity wheels with the specified speeds.

Value parameters

e

the dynamic entity on which the action will be executed.

leftSpeed

the speed to apply to the left wheel.

rightSpeed

the speed to apply to the right wheel.

Attributes

Returns

an effectful computation that results in the dynamic entity after the wheels have been moved.