Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 야구게임 베팅가능 금액 변경 #446

Merged
merged 5 commits into from
May 16, 2024

Conversation

yeochaeeon
Copy link
Collaborator

@yeochaeeon yeochaeeon commented May 9, 2024

🔥 Related Issue

close: #

📝 Description

  • 야구 게임 최대 베팅 금액을 5000에서 3000으로 수정했습니다 .
  • 1000과 3000사이 베팅 포인트를 벗어나는 경우에 대한 에러 코드를 추가했습니다.
  • earnable point 를 기존의 *2배로 변경하였습니다 .

⭐️ Review Request

  • 테스트를 돌리면 한 군데에서 아래 사진과 같은 test failed가 뜨는데 제가 야구 게임 코드를 다 파악하지 못해서 보시고 알려주시면 감사하겠습니다!
    image

@yeochaeeon yeochaeeon self-assigned this May 9, 2024
Comment on lines 134 to 138
val earnablePoint = baseballResultEntity.earnablePoint

if (baseballResultEntity.isEnd()) {
requestMember.addPoint(earnablePoint, EARN_POINT_MESSAGE)
gameEntity.baseball.baseballDayPoint = earnablePoint
requestMember.addPoint(earnablePoint*2, EARN_POINT_MESSAGE)
gameEntity.baseball.baseballDayPoint = earnablePoint*2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val earnablePoint = baseballResultEntity.earnablePoint

if (baseballResultEntity.isEnd()) {
    requestMember.addPoint(earnablePoint, EARN_POINT_MESSAGE)
    gameEntity.baseball.baseballDayPoint = earnablePoint
}

return BaseballResponse(
    convertBaseballResult(baseballResultEntity.results),
    baseballResultEntity.bettingPoint,
    earnablePoint,
    0
)

최종적으로 earnablePoint 변수를 BaseballResponse에 넣어서 반환하고 있는데,
if (baseballResultEntity.isEnd()) 안에서 계산된 earnablePoint*2, BaseballResponse에 담아서 반환하는 값이랑 달라서 그런 것 같아요.

코드를 완벽히 파악한건 아니지만.. if문 안에서 earnablePoint *= 2를 하면 해결되지 않을까 싶네요 ㅎ..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 맞네요!! 해결됐습니다 감사합니다!ㅎ

Copy link
Member

@gusah009 gusah009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~~ 지금 야구게임이 한 판만 가능할텐데 하루에 여러판 가능하게 수정해보는 것도 좋을 것 같아요~!

@02ggang9 02ggang9 merged commit 6ca749a into develop May 16, 2024
1 check failed
@02ggang9 02ggang9 deleted the Feature/#430-야구게임-금액-변경 branch May 16, 2024 06:43
@yeochaeeon yeochaeeon restored the Feature/#430-야구게임-금액-변경 branch May 27, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants