This commit is contained in:
2025-11-08 18:32:14 -05:00
parent 961f16acfb
commit 86a4331520
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ Hand :: struct {
Determine the rank of the hand Determine the rank of the hand
*/ */
evaluate_hand :: proc(hand: Hand) -> int { evaluate_hand :: proc(hand: Hand) -> int {
toal:int total:int
aces: [dynamic]int aces: [dynamic]int
for x, i in hand { for x, i in hand {
total = total + x.rank total = total + x.rank
@@ -43,7 +43,7 @@ evaluate_hand :: proc(hand: Hand) -> int {
Compare two hands and return true if the Compare two hands and return true if the
first one is better than the second one first one is better than the second one
*/ */
compare_hands :: proc(player: Hand, other: Hand) -> casino.Hand { compare_hands :: proc(player: Hand, other: Hand) -> casino.Outcome {
if evaluate_hand(player) > evaluate_hand(other) { if evaluate_hand(player) > evaluate_hand(other) {
return .WIN return .WIN
}else if evaluate_hand(player) < evaluate_hand(other) { }else if evaluate_hand(player) < evaluate_hand(other) {

View File

@@ -23,7 +23,7 @@ Suit :: enum {
/* /*
Type representing hand comparison Type representing hand comparison
*/ */
Hand :: enum { Outcome :: enum {
WIN, WIN,
LOSE, LOSE,
TIE, TIE,