#ifndef _BASETYPES_H_ #define _BASETYPES_H_ #include // std::numeric_limits #include "stdlib.h" // for size_t template constexpr size_t _countof(T (&)[N]) { return N; } // Coordinate types typedef short coord_t; typedef unsigned short ucoord_t; // Invalid values static const coord_t coord_invalid = std::numeric_limits::max(); static const ucoord_t ucoord_invalid = std::numeric_limits::max(); // Direction representation enum class dir_c : char { N = 'N', S = 'S', E = 'E', W = 'W' }; #endif //_BASETYPES_H_