ActionAlgebra

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

The ActionAlgebra trait defines the algebra of actions that can be performed on a dynamic entity, particularly actions that involve interacting with or modifying the entity's state.

Type parameters

E

the type of dynamic entity on which the actions will be performed, extending DynamicEntity.

F

the effectful computation type in which the actions will be performed.

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 wheels of the given dynamic entity by applying specified speeds to the left and right wheels.

Moves the wheels of the given dynamic entity by applying specified speeds to the left and right wheels.

Value parameters

e

the dynamic entity whose wheels are to be moved.

leftSpeed

the speed to apply to the left wheel.

rightSpeed

the speed to apply to the right wheel.

Attributes

Returns

an effectful computation resulting in the dynamic entity after the movement action is applied.