Skip to content
Snippets Groups Projects
Commit ce1d5bb5 authored by Bariatti Francesco's avatar Bariatti Francesco
Browse files

Implemented to_JSON with arrays

parent 9fdd8a1c
No related branches found
No related tags found
No related merge requests found
......@@ -386,14 +386,11 @@ namespace game
json_state["bitboards"]["twofish"] = state.two_fish;
json_state["bitboards"]["threefish"] = state.three_fish;
json_state["penguins"]["red"][0] = state.p1_red;
json_state["penguins"]["red"][1] = state.p2_red;
json_state["penguins"]["red"][2] = state.p3_red;
json_state["penguins"]["red"][3] = state.p4_red;
json_state["penguins"]["blue"][0] = state.p1_blue;
json_state["penguins"]["blue"][1] = state.p2_blue;
json_state["penguins"]["blue"][2] = state.p3_blue;
json_state["penguins"]["blue"][3] = state.p4_blue;
for(int i = 0; i < 4; i++)
{
json_state["penguins"]["red"][i] = state.peng_red[i];
json_state["penguins"]["blue"][i] = state.peng_blue[i];
}
json_state["score"]["red"] = state.score_red;
json_state["score"]["blue"] = state.score_blue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment