From ea2f2eec3499ec375ce5144a1d9691b06b6e7b30 Mon Sep 17 00:00:00 2001 From: yhpark95 <98851575+yhpark95@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:29:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=94=8C=EB=A0=88=EC=9D=B4=EC=96=B4=20?= =?UTF-8?q?=EC=88=9C=EC=84=9C=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?2=20#69?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/codesquad/gaemimarble/game/entity/GameStatus.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/be/src/main/java/codesquad/gaemimarble/game/entity/GameStatus.java b/be/src/main/java/codesquad/gaemimarble/game/entity/GameStatus.java index 1e4907b..b87d0d2 100644 --- a/be/src/main/java/codesquad/gaemimarble/game/entity/GameStatus.java +++ b/be/src/main/java/codesquad/gaemimarble/game/entity/GameStatus.java @@ -28,14 +28,15 @@ private GameStatus(Boolean isStarted, List players, List stocks, } public void setOrder(Integer firstOrder) { + firstOrder--; for (int i = 0; i < players.size(); i++) { - if (firstOrder + i != players.size()) { - players.get(i).setOrder(((firstOrder + i) % players.size())); - } else { + players.get(0).setOrder((firstOrder + players.size() + 1 + i) % players.size()); + if (players.get(i).getOrder() == 0) { players.get(i).setOrder(players.size()); } log.info("설정된 오더 (아이디 + 오더)" + players.get(i).getPlayerId() + "/" + players.get(i).getOrder()); } + } public void initCurrentPlayerInfo(Player player) {