Function get_direction_mask

  • Generate a mask for the given direction. Examples:

    • The given direction is left, which is 4, then this function will return: 00010000
    • The given direction is right, which is 0, then this function will return: 00000001

    Parameters

    • direction: directions

      The direction to generate the mask.

    Returns number

    Returns the mask.