Skip to content

Commit

Permalink
πŸ› :: penalty 계속 μˆ˜μ • μ•ˆλ¨
Browse files Browse the repository at this point in the history
  • Loading branch information
lyutvs committed Mar 9, 2023
1 parent 9d69cd9 commit 8f43680
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PointHistoryApiImpl(

false -> {
val addBadPoint = pointStatus.addBadPoint(getPointByPointId.point)
if (addBadPoint.badPoint >= penaltyLevelList[max(addBadPoint.penaltyLevel - 1, 0)]) {
if (!addBadPoint.isPenaltyRequired && addBadPoint.badPoint >= penaltyLevelList[addBadPoint.penaltyLevel]) {
val penaltyLevel = addBadPoint.penaltyEducationStart().penaltyLevelUp()
pointStatusSpi.applyPointStatusChanges(penaltyLevel)
} else {
Expand Down Expand Up @@ -86,7 +86,7 @@ class PointHistoryApiImpl(
}

private fun calculatePenaltyStart(penaltyEducationComplete: PointStatus): PointStatus {
val penaltyLevelList = listOf(15, 20, 25, 30, 35, 40, 45)
val penaltyLevelList = listOf(15, 20, 25, 30, 35, 45)
return if (penaltyEducationComplete.badPoint >= penaltyLevelList[penaltyEducationComplete.penaltyLevel - 1]) {
penaltyEducationComplete.penaltyEducationStart()
} else {
Expand Down

0 comments on commit 8f43680

Please sign in to comment.