Skip to content

Commit

Permalink
fix ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzn committed Nov 1, 2024
1 parent 4f049b1 commit de1d458
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/models/status/round/challenge.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,18 @@ fn _resolve_challenges(
PokerHand::None => (),
};

if hand_score <= 500 {
_complete(ref challenge, CHALLENGE_500_POINTS);
} else if hand_score <= 1000 {
_complete(ref challenge, CHALLENGE_1000_POINTS);
} else if hand_score <= 2000 {
_complete(ref challenge, CHALLENGE_2000_POINTS);
} else if hand_score <= 5000 {
if hand_score >= 5000 {
_complete(ref challenge, CHALLENGE_5000_POINTS);
} else {}
}
if hand_score >= 2000 {
_complete(ref challenge, CHALLENGE_2000_POINTS);
}
if hand_score >= 1000 {
_complete(ref challenge, CHALLENGE_1000_POINTS);
}
if hand_score >= 500 {
_complete(ref challenge, CHALLENGE_500_POINTS);
}

let mut idx = 0;
loop {
Expand Down

0 comments on commit de1d458

Please sign in to comment.