diff --git a/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java b/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java index d96b8d6..241394a 100644 --- a/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java +++ b/src/main/java/com/ntlab/irisserver/resources/SettingsRest.java @@ -11,41 +11,29 @@ @Component @Path("rooms") public class SettingsRest { - //お絵描きの制限時間、単位は秒、初期値は10 - int drawingTimerTimes = 10; - //ゲーム画面での諜報員が考える時間の長さ、単位は秒、初期値30 - int gameTimerTimes = 30; - //最初のヒントの追加考察時間、単位は秒、初期値10 - int gameTimerFirstThinkingTimes = 10; - - boolean drawingTimer = false; - boolean gameTimer = true; RoomManager rm = RoomManager.getInstance(); - - - @GET @Produces(MediaType.APPLICATION_JSON) @Path("/{rid}/settings") public Object GetSettings(@PathParam("rid") String rid) { - var response = Response.status(Response.Status.NO_CONTENT); Room r = rm.getRoom(rid); - //部屋が存在しない + /* + //部屋が存在しないとき + var response = Response.status(Response.Status.NO_CONTENT); if(r == null) { response.status(404).entity("部屋が存在しません"); throw new WebApplicationException(response.build()); - } + }*/ - - return "drawingTime:" + drawingTimer + ",\n" + - "drawingTimerTimes:" + drawingTimerTimes + ",\n" + - "gameTimer:" + gameTimer +",\n" + - "gameTimerTimes:" + gameTimerTimes + ",\n" + - "gameTimerInitializeTimes:" + gameTimerFirstThinkingTimes; + return "drawingTime:" + r.isDrawingTimer()+ ",\n" + + "drawingTimerTimes:" + r.getDrawingTimerTimes() + ",\n" + + "gameTimer:" + r.isGameTimer() +",\n" + + "gameTimerTimes:" + r.getGameTimerTimes() + ",\n" + + "gameTimerInitializeTimes:" + r.getGameTimerFirstThinkingTimes(); } @PUT @@ -66,9 +54,4 @@ r.setGameTimerFirstThinkingTimes(gTimerFTTimes); } - public void DrawingSetting(){ - } - - public void GameSetting(){ - } }