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

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Turn {

    @JsonProperty("hint")
    private String hint;

    @JsonProperty("team")
    private String team;

    @JsonProperty("max")
    private int max;

    private Map<Cell,List<Member>> questions = new HashMap<>();

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

    //コンストラクタ

    //---------------------------------------------------------
    //セッター

    public void setHint(String hint) {this.hint = hint;}

    public void setTeam(String team) {this.team = team;}

    public void setMax(int max) {this.max = max;}

    //---------------------------------------------------------
    //ゲッター

    public String getHint() {return hint;}

    public String getTeam() {return team;}

    public int getMax() {return max;}

    public List<Cell> getOpenLists() {return openlist;}

    public Map<Cell,List<Member>> getQuestionsMap() {return questions;}

    //---------------------------------------------------------
    //questions操作

    public List<Member> getQuestions(Cell card){return questions.get(card);}

    public void addQuestions(Cell card, Member m){questions.get(card).add(m);}

    public void delieteQuestions(Cell card, Member m){} //Listのキーが分からない状態での削除どうやんの?

    public int sizeQuestions(){return questions.size();}

    //openlist操作

    public Cell getOpenList(int num){return openlist.get(num);}

    public void addOpenList(Cell card){openlist.add(card);}

    public void delieteOpenList(int num){openlist.remove(num);}

    public int sizeOpenList(){return openlist.size();}


}