|
|
|
@@ -23,6 +23,11 @@ namespace AssistFunction |
|
|
|
return grid / numOfGridPerCell; |
|
|
|
} |
|
|
|
|
|
|
|
[[nodiscard]] constexpr inline int GridToCell(double grid) noexcept |
|
|
|
{ |
|
|
|
return int(grid) / numOfGridPerCell; |
|
|
|
} |
|
|
|
|
|
|
|
inline bool HaveView(int viewRange, int x, int y, int newX, int newY, std::vector<std::vector<THUAI6::PlaceType>>& map) |
|
|
|
{ |
|
|
|
int deltaX = newX - x; |
|
|
|
@@ -419,7 +424,7 @@ namespace THUAI62Proto |
|
|
|
return playerMsg; |
|
|
|
} |
|
|
|
|
|
|
|
inline protobuf::IDMsg THUAI62ProtobufID(int playerID) |
|
|
|
inline protobuf::IDMsg THUAI62ProtobufID(int64_t playerID) |
|
|
|
{ |
|
|
|
protobuf::IDMsg idMsg; |
|
|
|
idMsg.set_player_id(playerID); |
|
|
|
|