aboutsummaryrefslogtreecommitdiff
path: root/internal/game/quit_casino_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/quit_casino_test.go')
-rw-r--r--internal/game/quit_casino_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/game/quit_casino_test.go b/internal/game/quit_casino_test.go
index f055e07..f905fca 100644
--- a/internal/game/quit_casino_test.go
+++ b/internal/game/quit_casino_test.go
@@ -37,8 +37,8 @@ func quitTestGame(t *testing.T) (*Game, *net.Session) {
return g, sess
}
-func (g *Game) quitResting(name string) bool {
- _, ok := g.restTimers[name]
+func (g *Game) quitResting() bool {
+ _, ok := g.restTimers["alice"]
return ok
}
@@ -63,7 +63,7 @@ func TestQuitBlockedMidRoundKeepsWager(t *testing.T) {
if _, playing := g.Casino.Participation("alice"); !playing {
t.Fatal("quit mid-round removed the player from the table")
}
- if g.quitResting("alice") {
+ if g.quitResting() {
t.Fatal("blocked quit started the rest countdown")
}
// The stake is still committed to the round, not refunded.
@@ -90,7 +90,7 @@ func TestQuitBlockedMidRoundBaccarat(t *testing.T) {
if _, playing := g.Casino.Participation("alice"); !playing {
t.Fatal("quit mid-round removed the player from the baccarat table")
}
- if g.quitResting("alice") {
+ if g.quitResting() {
t.Fatal("blocked quit started the rest countdown")
}
}
@@ -111,7 +111,7 @@ func TestQuitLeavesTableBetweenRounds(t *testing.T) {
if _, playing := g.Casino.Participation("alice"); playing {
t.Fatal("quit did not free the table seat")
}
- if !g.quitResting("alice") {
+ if !g.quitResting() {
t.Fatal("quit did not start the rest countdown")
}
}
@@ -129,7 +129,7 @@ func TestQuitLeavesMachine(t *testing.T) {
if _, playing := g.Casino.Participation("alice"); playing {
t.Fatal("quit did not free the machine")
}
- if !g.quitResting("alice") {
+ if !g.quitResting() {
t.Fatal("quit did not start the rest countdown")
}
if strings.Contains(string(conn.data), "WARNING") {
@@ -145,7 +145,7 @@ func TestStopCancelsQuit(t *testing.T) {
g.executeStop(sess, nil, "stop")
- if g.quitResting("alice") {
+ if g.quitResting() {
t.Fatal("stop did not cancel the pending quit")
}
}
@@ -185,7 +185,7 @@ func TestQuitNowForfeitsOnlyAtLogout(t *testing.T) {
if _, playing := g.Casino.Participation("alice"); !playing {
t.Fatal("quit now freed the seat before the logout tick")
}
- if !g.quitResting("alice") {
+ if !g.quitResting() {
t.Fatal("quit now did not start the rest countdown")
}
@@ -210,7 +210,7 @@ func TestQuitNowForfeitsOnlyAtLogout(t *testing.T) {
if _, stillLoggedIn := g.loggedInChars["alice"]; stillLoggedIn {
t.Fatal("quit now did not remove the session from the logged-in map")
}
- if g.quitResting("alice") {
+ if g.quitResting() {
t.Fatal("countdown timer was not cleared after logout")
}
}
@@ -227,7 +227,7 @@ func TestQuitNowCancelledByStopMidRound(t *testing.T) {
g.doQuitNow(sess)
g.executeStop(sess, nil, "stop")
- if g.quitResting("alice") {
+ if g.quitResting() {
t.Fatal("stop did not cancel the pending quit-now countdown")
}
if _, playing := g.Casino.Participation("alice"); !playing {