aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-17 15:16:01 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:39 +0200
commit9463ec4cb063f0bde03d0e1b2a650f5887ad29ff (patch)
tree035af855f260b7a9d4e63d0b5ad67000ad6e8ea1 /go/game/state.go
parent5f97fb7a1606908e99be97d67e5871d55067dac7 (diff)
downloadmuhqs-game-9463ec4cb063f0bde03d0e1b2a650f5887ad29ff.tar.gz
muhqs-game-9463ec4cb063f0bde03d0e1b2a650f5887ad29ff.zip
use slog and add game log handler callback
Diffstat (limited to 'go/game/state.go')
-rw-r--r--go/game/state.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/go/game/state.go b/go/game/state.go
index ad3ea815..0d8066c0 100644
--- a/go/game/state.go
+++ b/go/game/state.go
@@ -3,13 +3,14 @@ package game
import (
"errors"
"fmt"
- "log"
"math/rand"
"strconv"
"strings"
"time"
"golang.org/x/exp/slices"
+
+ "muhq.space/muhqs-game/go/log"
)
type State interface {
@@ -539,7 +540,7 @@ func (s *LocalState) allPassing(skipFirst bool) (bool, []*Player) {
switch a := _a.(type) {
case *PassPriority:
- log.Printf("%s passed %d/%d\n", p.Name, i+1, nPlayers)
+ log.Info("priority passed\n", "player", p.Name, "passed", fmt.Sprintf("%d/%d", i+1, nPlayers))
case nil:
log.Fatal("received nil action from ", p.Name, " at ", s.activePhase)
default: