package org.ntlab.SproutServer.rooms; public class RoomResponse { public Room room; public int memberId; public boolean check; public int battleId; public RoomResponse(Room room,int userId,int memberId,boolean check){ this.room = room; this.check = check; this.memberId = memberId; } public RoomResponse(Room room,int userId){ this.room = room; this.battleId = room.getBattleId(); for(int i = 0;i<room.getMemberId();i++){ if(room.getMemberList().get(i) != null && userId == room.getMemberList().get(i).getUserId()){ this.memberId = i; } } } //ルームインスタンス public Room getRoom() { return room; } public void setRoom(Room room) { this.room = room; } //メンバーID public int getMemberId() { return memberId; } public void setMemberId(int memberId) { this.memberId = memberId; } //入室時のキーチェック public boolean isCheck() { return check; } public void setCheck(boolean check) { this.check = check; } }