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 GameJson { @JsonProperty("drawingList") private Map<Integer, Drawing> drawingList = new HashMap<>();//<dno, drawingのURL> @JsonProperty("map") private List<Integer> map = new ArrayList<>();//cno順にdnoを管理 @JsonProperty("colorList") private List<String> colorList = new ArrayList<>();//cno順にr,g,b,dを管理 //コンストラクタ public GameJson(Game g){ this.drawingList = g.getDrawingList(); this.map = g.getMap(); this.colorList = g.getColorList(); } //ゲッター public Map<Integer, Drawing> getDrawingList() {return drawingList;} public List<Integer> getMap() {return map;} public List<String> getColorList() {return colorList;} //セッター public void setDrawingList(Map<Integer, Drawing> dlist) {drawingList = dlist;} public void setMap(List<Integer> map) {this.map = map;} public void setColorList(List<String> color) {this.colorList = color;} }