/
RedResistance
/
JSonMall
Обзор
Документация
Войти
/
RedResistance
/
JSonMall
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
simulation.h
34 строки
796 B
Domovoi-Kuzma
json_factory
22 июл 2025, 23:01
22 июл 2025, 23:01
7934937
Код
Авторство
О чём код?
#pragma once #include <string> #include <vector> #include <map> #include "fraction.h" struct resource_properties { int id; std::string name; }; struct resource_rate { int resource_id; fraction eat_per_person_per_second; }; struct kasta_stage_properties { int required_people; std::vector<resource_rate> eaten; }; struct kasta_property { int kasta_id; int max_house; std::string name; std::vector<kasta_stage_properties> stages; }; struct house { int kasta_id; int inhabitants_cnt; }; //struct town global extern std::vector<std::vector<house> > houses_by_kasta; extern std::vector<kasta_property> kasta_properties; extern std::vector<int> kasta_stages;// kasta_properties[i][kasta_stages[i] ] extern std::map<std::string, int> res_dict; extern std::map<std::string, int> kast_dict;