diff --git a/src/main/java/org/toop/game/tictactoe/TicTacToe.java b/src/main/java/org/toop/game/tictactoe/TicTacToe.java index 127f535..5914fbd 100644 --- a/src/main/java/org/toop/game/tictactoe/TicTacToe.java +++ b/src/main/java/org/toop/game/tictactoe/TicTacToe.java @@ -43,8 +43,20 @@ public class TicTacToe extends GameBase implements Runnable { commandQueue.add(command); } - private void addSendToQueue(String send) throws InterruptedException { - sendQueue.put(send); + private void takeFromCommandQueue() { + try { + ParsedCommand cmd = this.commandQueue.take(); + } catch (InterruptedException e) { + logger.error("Taking from queue interrupted, in game with id: {}", this.gameId); + } + } + + private void addSendToQueue(String send) { + try { + sendQueue.put(send); + } catch (InterruptedException e) { + logger.error("Sending to queue interrupted, in game with id: {}", this.gameId); + } } @Override