From 4a3cc2211062deeae5aa1c6cefaed772ba44efc3 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 22 Jul 2025 18:36:07 -0400 Subject: minor cleanup removing debug prints --- go/game/action.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'go/game/action.go') diff --git a/go/game/action.go b/go/game/action.go index 0533a109..5f478de7 100644 --- a/go/game/action.go +++ b/go/game/action.go @@ -743,11 +743,11 @@ var ActionRegex = regexp.MustCompile(`^([^\xA0]*)\xA0([^\xA0]*)\xA0?(.*)?$`) func UnmarshalAction(s State, in []byte) (a Action, err error) { m := ActionRegex.FindSubmatch(in) if len(m) < 2 || len(m) > 4 { - log.Println(m) return nil, InvalidActionFormat } _action := string(m[2]) - if _action == "pick" { + switch _action { + case "pick": p := s.PlayerByName(string(m[1])) if p == nil { err = errors.New("Unknown player") @@ -764,7 +764,7 @@ func UnmarshalAction(s State, in []byte) (a Action, err error) { return nil, err } a = NewDraftPick(p, pack, pick) - } else if _action == "pass" { + case "pass": p := s.PlayerByName(string(m[1])) if p == nil { err = errors.New("Unknown player") -- cgit v1.2.3