From d75d1d49b05093e075e62d4d9b3c7a67190a00d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A1=9C=EC=A7=80=EA=BE=B8?= <36785562+OtakoidTony@users.noreply.github.com> Date: Sun, 2 May 2021 07:00:57 +0900 Subject: [PATCH] Update shiritori.cpp --- shiritori.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shiritori.cpp b/shiritori.cpp index 45f78ba..943075b 100644 --- a/shiritori.cpp +++ b/shiritori.cpp @@ -69,12 +69,12 @@ void Shiritori::Game::go(Player &player, const string &word) { } int Shiritori::Game::check(const Player &player, string word) { - if (lastWord.empty()) { - return CheckResult::FIRST_WORD; - } if (player != players[times % headcount]) { return CheckResult::NOT_PLAYER_TURN; } + if (lastWord.empty()) { + return CheckResult::FIRST_WORD; + } if (!isAvailableWord(word)) { return CheckResult::UNAVAILABLE_WORD; } @@ -104,4 +104,4 @@ bool Shiritori::Game::isUsed(const string &word) { return true; } return false; -} \ No newline at end of file +}