The direction parameter is used to specify the current direction of the character. It can be any value that represents a direction, such as "north", "south", "east", or "west".
The turning
parameter is an object that maps each direction to the corresponding
turning direction. It is used to determine the new direction when the character turns.
Generated using TypeDoc
The constructor function takes in a direction and turning object and sets the direction and turn properties of the Character class.