mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
style: 代码规范!
This commit is contained in:
@@ -38,10 +38,10 @@ namespace asst
|
||||
{
|
||||
return "[ " + std::to_string(x) + ", " + std::to_string(y) + " ]";
|
||||
}
|
||||
static constexpr Point RightDirection() { return Point(1, 0); }
|
||||
static constexpr Point DownDirection() { return Point(0, 1); }
|
||||
static constexpr Point LeftDirection() { return Point(-1, 0); }
|
||||
static constexpr Point UpDirection() { return Point(0, -1); }
|
||||
static constexpr Point right() { return Point(1, 0); }
|
||||
static constexpr Point down() { return Point(0, 1); }
|
||||
static constexpr Point left() { return Point(-1, 0); }
|
||||
static constexpr Point up() { return Point(0, -1); }
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
};
|
||||
|
||||
@@ -729,10 +729,10 @@ std::pair<asst::Point, int> asst::RoguelikeBattleTaskPlugin::calc_best_direction
|
||||
}
|
||||
std::vector<std::pair<const Point&, std::vector<Point>>> DirectionAttackRangeMap;
|
||||
DirectionAttackRangeMap.reserve(4);
|
||||
DirectionAttackRangeMap.emplace_back(Point::RightDirection(), std::move(right_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::DownDirection(), std::move(down_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::LeftDirection(), std::move(left_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::UpDirection(), std::move(up_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::right(), std::move(right_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::down(), std::move(down_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::left(), std::move(left_attack_range));
|
||||
DirectionAttackRangeMap.emplace_back(Point::up(), std::move(up_attack_range));
|
||||
|
||||
int max_score = 0;
|
||||
Point opt_direction;
|
||||
|
||||
Reference in New Issue
Block a user