问题描述:

error: call of overloaded ‘abs(unsigned int)’ is ambiguous
         unsigned int dist = abs(goal_x - tmp_goal_x) + abs(goal_y - tmp_goal_y);

解决办法:
修改为:

unsigned int dist = abs(int(goal_x - tmp_goal_x)) + abs(int(goal_y - tmp_goal_y));
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐