Skip to content

Commit

Permalink
Update shiritori.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rojikku-dev authored May 1, 2021
1 parent 0c4a028 commit d75d1d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shiritori.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -104,4 +104,4 @@ bool Shiritori::Game::isUsed(const string &word) {
return true;
}
return false;
}
}

0 comments on commit d75d1d4

Please sign in to comment.