model.entities.customers.Movable
Defines the contract for an entity that can move within the simulation environment.
This trait extends Positioned, adding the concept of a direction vector and methods to update both position and direction.
Type parameters
-
T
-
The concrete type of the entity that extends this trait, enabling F-bounded polymorphism for immutable updates.
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Known subtypes
-
Members list
Returns a new instance of the entity with an updated direction. This method ensures immutability.
Returns a new instance of the entity with an updated direction. This method ensures immutability.
Value parameters
-
newDirection
-
The new direction vector for the entity.
Attributes
-
Returns
-
A new instance of the entity with the updated direction.
Returns a new instance of the entity with an updated position. This method ensures immutability.
Returns a new instance of the entity with an updated position. This method ensures immutability.
Value parameters
-
newPosition
-
The new position for the entity.
Attributes
-
Returns
-
A new instance of the entity with the updated position.
Returns a new instance of the entity with its direction updated by adding a given vector to the current direction.
Returns a new instance of the entity with its direction updated by adding a given vector to the current direction.
Value parameters
-
addingDirection
-
The vector to add to the current direction.
Attributes
-
Returns
-
A new instance of the entity with the added direction.
The current direction vector of the entity.
The current direction vector of the entity.
Attributes