Newer
Older
IrisServer / src / main / java / com / ntlab / irisserver / entities / GameJson.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 GameJson {
    @JsonProperty("drawingList")
    private Map<Integer, Drawing> drawingList; //<dno, drawingのURL>
    @JsonProperty("map")
    private List<Integer> map ; //cno順にdnoを管理
    @JsonProperty("colorList")
    private List<String> colorList ; //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;}

}