diff --git a/gotcha-socket/src/main/java/socket_server/domain/game/repository/GameRepository.java b/gotcha-socket/src/main/java/socket_server/domain/game/repository/GameRepository.java index 3b36ae5b..4486ec9b 100644 --- a/gotcha-socket/src/main/java/socket_server/domain/game/repository/GameRepository.java +++ b/gotcha-socket/src/main/java/socket_server/domain/game/repository/GameRepository.java @@ -20,6 +20,7 @@ public class GameRepository { private final RedisTemplate redisTemplate; + //todo: Lock 관련 코드 전면 수정 private final RedissonClient redissonClient; public GameRepository(@Qualifier("socketStringRedisTemplate") RedisTemplate redisTemplate, RedissonClient redissonClient) { @@ -39,11 +40,11 @@ public static String getGameKey(String roomId) { */ public void saveGameMeta(GameMeta gameMeta) { String redisKey = getGameKey(gameMeta.getRoomId()); // Redis 해시 키 - String lockKey = "lock:" + redisKey; // 락 키 - - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; // 락 키 +// +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 Map gameData = Map.of( "gameType", gameMeta.getGameType().name(), "difficulty", gameMeta.getDifficulty().name(), @@ -55,17 +56,17 @@ public void saveGameMeta(GameMeta gameMeta) { "playerWon", String.valueOf(gameMeta.getPlayerWon()) ); redisTemplate.opsForHash().putAll(getGameKey(gameMeta.getRoomId()), gameData); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } /** @@ -73,22 +74,22 @@ public void saveGameMeta(GameMeta gameMeta) { */ public Map findGameMeta(String roomId) { String redisKey = getGameKey(roomId); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 return redisTemplate.opsForHash().entries(redisKey); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } public void deleteGameMeta(String roomId){ diff --git a/gotcha-socket/src/main/java/socket_server/domain/game/repository/RoundRepository.java b/gotcha-socket/src/main/java/socket_server/domain/game/repository/RoundRepository.java index 146617fd..5c7a49da 100644 --- a/gotcha-socket/src/main/java/socket_server/domain/game/repository/RoundRepository.java +++ b/gotcha-socket/src/main/java/socket_server/domain/game/repository/RoundRepository.java @@ -17,6 +17,7 @@ @Repository public class RoundRepository { private final RedisTemplate redisTemplate; + //todo: Lock 관련 코드 전면 수정 private final RedissonClient redissonClient; public RoundRepository(@Qualifier("socketStringRedisTemplate") RedisTemplate redisTemplate, RedissonClient redissonClient) { @@ -36,23 +37,23 @@ public static String getGameRoundsKey(String roomId) { */ public void saveRoundMetasString(String roomId, String roundsJson) { String redisKey = getGameRoundsKey(roomId); - String lockKey = "lock:" + redisKey; - - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 redisTemplate.opsForValue().set(redisKey, roundsJson); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } /** @@ -60,22 +61,22 @@ public void saveRoundMetasString(String roomId, String roundsJson) { */ public String findRoundMetasString(String roomId) { String key = getGameRoundsKey(roomId); - String lockKey = "lock:" + key; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + key; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 return redisTemplate.opsForValue().get(key); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } @@ -96,22 +97,22 @@ private String getRoundWordsKey(String roomId, int roundIndex) { */ public void saveWordMetasString(String roomId, int roundIndex, String wordsJson) { String redisKey = getRoundWordsKey(roomId, roundIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 redisTemplate.opsForValue().set(redisKey, wordsJson); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } /** @@ -119,22 +120,22 @@ public void saveWordMetasString(String roomId, int roundIndex, String wordsJson) */ public String findWordMetasString(String roomId, int roundIndex) { String redisKey = getRoundWordsKey(roomId, roundIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 return redisTemplate.opsForValue().get(redisKey); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } public void deleteWordMetas(String roomId, int roundIndex) { @@ -152,22 +153,22 @@ private String getAIPredicionsKey(String roomId, int roundIndex, int wordIndex) */ public void saveAIPredictionsString(String roomId, int roundIndex, int wordIndex, String predictionsJson){ String redisKey = getAIPredicionsKey(roomId, roundIndex, wordIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 redisTemplate.opsForValue().set(redisKey, predictionsJson); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } /** @@ -175,22 +176,22 @@ public void saveAIPredictionsString(String roomId, int roundIndex, int wordIndex */ public String findAIPredictionsString(String roomId, int roundIndex, int wordIndex) { String redisKey = getAIPredicionsKey(roomId, roundIndex, wordIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 return redisTemplate.opsForValue().get(redisKey); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } public void deleteAIPredictions(String roomId, int roundIndex, int wordIndex) { @@ -209,22 +210,22 @@ private String getAIGuessKey(String roomId, int roundIndex, int wordIndex){ */ public void saveAIGuessesString(String roomId, int roundIndex, int wordIndex, String guessesJson){ String redisKey = getAIGuessKey(roomId, roundIndex, wordIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 redisTemplate.opsForValue().set(redisKey, guessesJson); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } /** @@ -232,22 +233,22 @@ public void saveAIGuessesString(String roomId, int roundIndex, int wordIndex, St */ public String findAIGuessesString(String roomId, int roundIndex, int wordIndex) { String redisKey = getAIGuessKey(roomId, roundIndex, wordIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 return redisTemplate.opsForValue().get(redisKey); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } public void deleteAIGuesses(String roomId, int roundIndex, int wordIndex) { @@ -267,22 +268,22 @@ private String getPlayerGuessKey(String roomId, int roundIndex, int wordIndex){ */ public String findPlayerGuessesString(String roomId, int roundIndex, int wordIndex) { String redisKey = getPlayerGuessKey(roomId, roundIndex, wordIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 return redisTemplate.opsForValue().get(redisKey); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } /** @@ -290,22 +291,22 @@ public String findPlayerGuessesString(String roomId, int roundIndex, int wordInd */ public void savePlayerGuesses(String roomId, int roundIndex, int wordIndex, String guessesJson){ String redisKey = getPlayerGuessKey(roomId, roundIndex, wordIndex); - String lockKey = "lock:" + redisKey; - RLock lock = redissonClient.getLock(lockKey); - try { - if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 +// String lockKey = "lock:" + redisKey; +// RLock lock = redissonClient.getLock(lockKey); +// try { +// if (lock.tryLock(1, 5, TimeUnit.SECONDS)) { // 1초 기다리고, 5초 동안 유지 redisTemplate.opsForValue().set(redisKey, guessesJson); - } else { - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); // - throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); - } finally { - if (lock.isHeldByCurrentThread()) { - lock.unlock(); - } - } +// } else { +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_ACQUISITION_FAILED); +// } +// } catch (InterruptedException e) { +// Thread.currentThread().interrupt(); // +// throw new SocketCustomException(ErrorType.GAME, GameExceptionCode.LOCK_INTERRUPTED); +// } finally { +// if (lock.isHeldByCurrentThread()) { +// lock.unlock(); +// } +// } } public void deletePlayerGuesses(String roomId, int roundIndex, int wordIndex) { diff --git a/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessFlowService.java b/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessFlowService.java index 5c5e20ed..97a3b8e8 100644 --- a/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessFlowService.java +++ b/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessFlowService.java @@ -67,7 +67,7 @@ public void startGuessingPhase(String roomId) { // log.info("[GUESS_START] broadcasted"); gameMeta.setGameStatus(GameStatus.GUESSING_STARTED); gameRepository.saveGameMeta(gameMeta); - taskScheduler.schedule(() ->processNextGuessRequest(roomId), Instant.now().plusSeconds(1)); + taskScheduler.schedule(() ->processNextGuessRequest(roomId), Instant.now().plusSeconds(2)); } @@ -94,6 +94,7 @@ public void processNextGuessRequest(String roomId){ boolean isAITurn = determineNextGuesser(currentWord); if(isAITurn){ // next guess + Guess newGuess = guessRequestService.requestGuessAI(roomId, gameMeta, currentWord); taskScheduler.schedule(() -> handleAIGuessSubmit(roomId, currentRound, currentWord, newGuess) @@ -391,7 +392,7 @@ private void handleGuessResult(String roomId, Round currentRound, Word currentWo if(isWordGuessCompleted(currentWord)){ taskScheduler.schedule(() ->handleBattleEnd(roomId, currentRound, currentWord), Instant.now().plusSeconds(1)); } else { - processNextGuessRequest(roomId); + taskScheduler.schedule(() -> processNextGuessRequest(roomId), Instant.now().plusSeconds(2)); } } diff --git a/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessRequestService.java b/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessRequestService.java index 21b94a34..33cfa142 100644 --- a/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessRequestService.java +++ b/gotcha-socket/src/main/java/socket_server/domain/game/service/GuessRequestService.java @@ -77,7 +77,7 @@ public void requestGuessPlayer(String roomId, GameMeta gameMeta, Word word) { // 3. BUILD NEW GUESS DATA Guess guess = Guess.builder().guesserUuid(gusser.getPlayerUuid()).attempts(guesses.size()+1).build(); - guess.setGuessEndTime(LocalDateTime.now().plusSeconds(32)); + guess.setGuessEndTime(LocalDateTime.now().plusSeconds(62)); // 4. BroadCast gameBroadCaster.broadcastGameEvent("SYSTEM", roomId, GameEventType.GUESS_REQUEST, guess, aiSays); diff --git a/gotcha-socket/src/main/java/socket_server/domain/game/service/RoundStartService.java b/gotcha-socket/src/main/java/socket_server/domain/game/service/RoundStartService.java index 98a1efad..86f66ed8 100644 --- a/gotcha-socket/src/main/java/socket_server/domain/game/service/RoundStartService.java +++ b/gotcha-socket/src/main/java/socket_server/domain/game/service/RoundStartService.java @@ -63,7 +63,7 @@ public void startNextRound(String roomId) { new AIRoundStartReq(currentRound, gameMeta.getTotalRounds()) ); - currentRoundMeta.setDrawingEndTime(LocalDateTime.now().plusSeconds(30)); + currentRoundMeta.setDrawingEndTime(LocalDateTime.now().plusSeconds(60)); gameBroadCaster.broadcastGameEvent("SYSTEM", roomId, GameEventType.ROUND_START, currentRoundMeta, aiSays); }