| 25 | } |
| 26 | |
| 27 | Json::Value skill_to_json(std::string type, std::vector<Fish*> targets, int player, int value, bool is_skill) { |
| 28 | Json::Value json_skill, json_targets; |
| 29 | json_skill["type"] = type; |
| 30 | json_skill["isSkill"] = is_skill; |
| 31 | for(auto i : targets) { |
| 32 | Json::Value json_target; |
| 33 | json_target["pos"] = i->pos; |
| 34 | json_target["player"] = player; |
| 35 | json_target["value"] = value; |
| 36 | json_targets.append(json_target); |
| 37 | } |
| 38 | json_skill["targets"] = json_targets; |
| 39 | return json_skill; |
| 40 | } |
| 41 | |
| 42 | Json::Value passive_to_json(std::string type, int source, int player, float value, int time) { |
| 43 | Json::Value json; |
no outgoing calls
no test coverage detected