-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
147 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
key value | ||
asset_file ./../../ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/*########################################################################################## | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
##########################################################################################*/ | ||
|
||
#include <string> | ||
|
||
#include <PAX_SAPIENTICA/Simulation/Environment.hpp> | ||
|
||
int main() | ||
{ | ||
const std::string setting_file_path = "../../../Data/Simulations/MapList.tsv"; | ||
paxs::Environment<int> environment(setting_file_path); | ||
std::cout << "data size: " << environment.data_map.size() << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/*########################################################################################## | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
##########################################################################################*/ | ||
|
||
#include <SFML/Graphics.hpp> | ||
|
||
int main() | ||
{ | ||
// ウィンドウの作成 | ||
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window"); | ||
|
||
// 四角形の作成 | ||
sf::RectangleShape rectangle(sf::Vector2f(100.f, 100.f)); | ||
rectangle.setFillColor(sf::Color::Red); | ||
rectangle.setPosition(350.f, 250.f); | ||
|
||
// ゲームループ | ||
while (window.isOpen()) | ||
{ | ||
// イベントの処理 | ||
sf::Event event; | ||
while (window.pollEvent(event)) | ||
{ | ||
if (event.type == sf::Event::Closed) | ||
window.close(); | ||
} | ||
|
||
// 描画 | ||
window.clear(); | ||
window.draw(rectangle); | ||
window.display(); | ||
} | ||
|
||
return 0; | ||
} |
23 changes: 23 additions & 0 deletions
23
Projects/IntegrationTest/Source/SettlementSimulatorTest.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/*########################################################################################## | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
##########################################################################################*/ | ||
|
||
#include <memory> | ||
|
||
#include <PAX_SAPIENTICA/Simulation/SettlementSimulator.hpp> | ||
|
||
int main() { | ||
const std::string map_list_path = "Data/Simulations/MapList.tsv"; | ||
const std::string& japan_provinces_path = "Data/Simulations/Japan200-725"; | ||
std::random_device seed_gen; | ||
std::unique_ptr<paxs::SettlementSimulator<int>> simulator = std::make_unique<paxs::SettlementSimulator<int>>(map_list_path, japan_provinces_path, seed_gen()); | ||
simulator->init(); | ||
simulator->run(50); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/*########################################################################################## | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
##########################################################################################*/ | ||
|
||
#include <memory> | ||
|
||
#include <PAX_SAPIENTICA/Simulation/Simulator.hpp> | ||
|
||
int main() { | ||
const std::string setting_file_path = "../../../Data/Simulations/MapList.tsv"; | ||
std::unique_ptr<paxs::Simulator<int>> simulator = std::make_unique<paxs::Simulator<int>>(setting_file_path, 10); | ||
simulator->init(); | ||
simulator->run(50); | ||
std::vector<paxs::Agent<int>> agents = simulator->getAgents(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*########################################################################################## | ||
PAX SAPIENTICA Library 💀🌿🌏 | ||
[Planning] 2023-2024 As Project | ||
[Production] 2023-2024 As Project | ||
[Contact Us] [email protected] https://github.com/AsPJT/PAX_SAPIENTICA | ||
[License] Distributed under the CC0 1.0. https://creativecommons.org/publicdomain/zero/1.0/ | ||
##########################################################################################*/ | ||
|
||
#include <PAX_GRAPHICA/Circle.hpp> | ||
#include <PAX_GRAPHICA/Graphics.hpp> | ||
#include <PAX_GRAPHICA/Rect.hpp> | ||
#include <PAX_GRAPHICA/String.hpp> | ||
#include <PAX_GRAPHICA/Window.hpp> | ||
|
||
int main() { | ||
paxg::Rect rect(0, 0, 100, 100); | ||
// paxg::Circle circle(100, 100, 50); | ||
paxg::String path("../data/sample.png"); | ||
paxg::Texture texture(path); | ||
paxg::Window::Init(800, 600, "PAX SAPIENTICA Library"); | ||
while (paxg::Window::update()) { | ||
paxg::Window::clear(); | ||
rect.draw(); | ||
// circle.draw(); | ||
// texture.drawAt({200, 200}); | ||
paxg::Window::display(); | ||
} | ||
} |