diff --git a/src/main/java/com/ntlab/irisserver/entities/Turn.java b/src/main/java/com/ntlab/irisserver/entities/Turn.java index 862f48c..dac1b89 100644 --- a/src/main/java/com/ntlab/irisserver/entities/Turn.java +++ b/src/main/java/com/ntlab/irisserver/entities/Turn.java @@ -2,6 +2,11 @@ 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") @@ -11,7 +16,11 @@ private String team; @JsonProperty("max") - private Integer max; + private int max; + + private Map> questions = new HashMap<>(); + + private List openlist = new ArrayList<>(); //コンストラクタ @@ -22,16 +31,41 @@ public void setTeam(String team) {this.team = team;} - public void setMax(Integer max) {this.max = max;} + public void setMax(int max) {this.max = max;} //--------------------------------------------------------- //ゲッター - public String getHint() {return this.hint;} + public String getHint() {return hint;} - public String getTeam() {return this.team;} + public String getTeam() {return team;} - public Integer getMax() {return this.max;} + public int getMax() {return max;} + + public List getOpenLists() {return openlist;} + + public Map> getQuestionsMap() {return questions;} + + //--------------------------------------------------------- + //questions操作 + + public List 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();} }