From 9a716a7d2ce514f452b425caedc1a9a15cde09f0 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 7 Aug 2026 05:02:39 -0400 Subject: feat: disconnect forfeits bet and frees up seat --- internal/casino/cards.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'internal/casino/cards.go') 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 } } -- cgit v1.2.3