rotate

fun rotate(dirRotate: DirRotate): Dir4

Rotates the current direction based on the given rotation direction.

Return

The new direction after rotation.

Parameters

dirRotate

The direction to rotate (CLOCKWISE or COUNTERCLOCKWISE).