rex/examplar.cpp

27 lines
862 B
C++
Raw Normal View History

2017-04-18 23:04:21 +00:00
#include <iostream>
#include "src/json/json.h"
#include "src/loaders.h"
int main()
{
2017-04-19 05:50:34 +00:00
Conf configuration = Conf("config.json");
UnitHolder unitHolder = UnitHolder( configuration.get_units_path() );
Plan plan = Plan( configuration.get_plan_path() );
2017-04-19 06:27:54 +00:00
2017-04-19 05:50:34 +00:00
for ( int i = 0; i < plan.tasks.size(); ++i )
{
std::string current_task_name = plan.tasks[i].get_name();
std::cout << "Found task name:\t" << current_task_name << std::endl << std::endl;
Unit current_unit = unitHolder.select_unit( current_task_name );
std::cout << "Associated Unit name:\t" << current_unit.get_name() << std::endl;
std::cout << "Associated Unit target:\t" << current_unit.get_target() << std::endl;
std::cout << "Associated Unit healer:\t" << current_unit.get_rectifier() << std::endl << std::endl;
2017-04-19 05:54:34 +00:00
}
2017-04-19 05:50:34 +00:00
2017-04-18 23:04:21 +00:00
return 0;
}