Skip to main content

direction_to_2d

Function direction_to_2d 

Source
const fn direction_to_2d(dir: Option<Direction>) -> i8
Expand description

Converts Option<Direction> to the vanilla 2D data value encoding for persistence. -1 = none, 0 = south, 1 = west, 2 = north, 3 = east.