Newer
Older
IrisServer / src / main / java / com / ntlab / irisserver / entities / TurnJson.java
package com.ntlab.irisserver.entities;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

public class TurnJson {

    @JsonProperty("hint")
    private String hint;

    @JsonProperty("team")
    private String team;

    @JsonProperty("max")
    private int max;

    @JsonProperty("turnstate")
    private int turnstate; //0:スパイマスターのターン 1:諜報員のターン

    @JsonProperty("gamestate")
    private int gamestate; //0:turn継続, 1:turn終了, 2:game終了

    private List<Integer> openlist = new ArrayList<>();

    //コンストラクタ

    public TurnJson(Turn t){
        hint = t.getHint();
        team = t.getTeam();
        max = t.getMax();
        openlist = t.getOpenListAll();
        turnstate = t.getTurnstate();
        gamestate = t.getGamestate();
    }

}