Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

集落を追加 #47

Merged
merged 13 commits into from
Sep 18, 2023
Prev Previous commit
Next Next commit
fix: GroupSimulator
guinpen98 committed Sep 7, 2023
commit 062b18cdc98c26b7d6ecfc6a2faaa7b67cb3d79e
7 changes: 3 additions & 4 deletions Library/PAX_SAPIENTICA/Simulation/GroupSimulator.hpp
Original file line number Diff line number Diff line change
@@ -27,12 +27,11 @@ namespace paxs {
{
public:
using Vector2 = paxs::Vector2<GridType>;
using UnitGroup = paxs::UnitGroup<GridType>;
using Environment = paxs::Environment<GridType>;
using Agent = paxs::Agent<GridType>;

constexpr explicit GroupSimulator() = default;
guinpen98 marked this conversation as resolved.
Show resolved Hide resolved
explicit GroupSimulator
explicit Simulator(const std::string& setting_file_path, const Vector2& start_position, const Vector2& end_position, const int z, const unsigned seed = 0) :
explicit GroupSimulator(const std::string& setting_file_path, const Vector2& start_position, const Vector2& end_position, const int z, const unsigned seed = 0) :
guinpen98 marked this conversation as resolved.
Show resolved Hide resolved
environment(std::make_unique<Environment>(setting_file_path, start_position, end_position, z)), gen(seed) {
if (z <= 0) {
Logger logger("Save/error_log.txt");
@@ -49,7 +48,7 @@ namespace paxs {
}

private:
std::vector<BaseGroup> groups; // グループ
std::vector<BaseGroup<GridType>> groups; // グループ
std::shared_ptr<Environment> environment; // 環境
std::mt19937 gen; // 乱数生成器

guinpen98 marked this conversation as resolved.
Show resolved Hide resolved