diff options
| author | historia <[not public]> | 2026-08-07 05:02:39 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-08-07 05:02:39 -0400 |
| commit | 9a716a7d2ce514f452b425caedc1a9a15cde09f0 (patch) | |
| tree | de980f16c4af93512a1616e6521275fd62aca542 /internal/casino/cards.go | |
| parent | 0f008790f192a491ac3901d54b506b756f57fef8 (diff) | |
| download | thehouseoficarus-9a716a7d2ce514f452b425caedc1a9a15cde09f0.tar.gz | |
feat: disconnect forfeits bet and frees up seat
Diffstat (limited to 'internal/casino/cards.go')
| -rw-r--r-- | internal/casino/cards.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/casino/cards.go b/internal/casino/cards.go index 0c32e06..f263eb6 100644 --- a/internal/casino/cards.go +++ b/internal/casino/cards.go @@ -1,8 +1,8 @@ package casino import ( - "fmt" "math/rand" + "strconv" ) // card is a single playing card shared by every card-based table game. @@ -21,8 +21,7 @@ func (c card) blackjackValue() int { case "K", "Q", "J": return 10 default: - var value int - fmt.Sscanf(c.rank, "%d", &value) + value, _ := strconv.Atoi(c.rank) return value } } @@ -35,8 +34,7 @@ func (c card) baccaratValue() int { case "A": return 1 default: - var value int - fmt.Sscanf(c.rank, "%d", &value) + value, _ := strconv.Atoi(c.rank) return value } } |
