const fn direction_to_2d(dir: Option<Direction>) -> i8
Converts Option<Direction> to the vanilla 2D data value encoding for persistence. -1 = none, 0 = south, 1 = west, 2 = north, 3 = east.
Option<Direction>