private void fillInitData(final GameRoom gameRoom) { gameRoom.setStatus(Status.NORMAL); gameRoom.getPlayers().add(gameRoom.getOwner()); gameRoom.getPlayerRankMap().put(1, gameRoom.getOwner()); final Date now = new Date(); gameRoom.setCreated(now); gameRoom.setUpdated(now); gameRoom.setEnabled(Enabled.TRUE); }
private void deleteOperation(GameRoom gameRoom) throws JsonProcessingException { gameRoom.setEnabled(Enabled.FALSE); gameRoom.getPlayers().clear(); gameRoom.getPlayerRankMap().clear(); gameRoom.setDeleted(new Date()); }