Skip to content

Commit

Permalink
fix: 남은 힌트 개수 계산 로직 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
krrong committed Oct 19, 2023
1 parent 7b4d1ba commit bcf554f
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ class OnAdventureViewModel @Inject constructor(
}

private fun isAllHintsUsed(): Boolean {
return getRemainingHintCount() <= 0
}

private fun getRemainingHintCount(): Int {
val usedHintCount = adventure.value?.hints?.size ?: 0
return (RemainingTryCount(MAX_HINT_COUNT) - usedHintCount).toInt()
return remainingHintCount <= 0
}

fun endAdventure() {
Expand Down

0 comments on commit bcf554f

Please sign in to comment.