diff --git a/cmd/2sp/main.go b/cmd/2sp/main.go index 397accd..70d87ce 100644 --- a/cmd/2sp/main.go +++ b/cmd/2sp/main.go @@ -43,7 +43,6 @@ func main() { game.WithStateMessagePeriod(config.StateMessagePeriod), game.WithEnableSymmetricEncryption(config.EnableSymmetricEncryption), game.WithClock(clockwork.NewRealClock()), - game.WithFeatureDeckSelection(config.FeatureDeckSelection()), } game := game.NewGame(options) diff --git a/internal/config/config.go b/internal/config/config.go index b2bfe73..d0d1420 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -37,7 +37,6 @@ var wakuDiscV5 bool var wakuDnsDiscovery bool var demo bool var version bool -var featureFlagEnableDeckSelection bool var Logger *zap.Logger var LogFilePath string @@ -101,7 +100,6 @@ func ParseArguments() { flag.BoolVar(&wakuDnsDiscovery, "waku.dnsdiscovery", true, "Enable DNS discovery") flag.BoolVar(&demo, "demo", false, "Run demo and quit") flag.BoolVar(&version, "version", false, "Print version and quit") - flag.BoolVar(&featureFlagEnableDeckSelection, "feature.deck", false, "Enable deck selection feature") flag.Parse() initialAction = strings.Join(flag.Args(), " ") @@ -156,7 +154,3 @@ func Demo() bool { } func Version() bool { return version } - -func FeatureDeckSelection() bool { - return featureFlagEnableDeckSelection -} diff --git a/pkg/game/features.go b/pkg/game/features.go index 82148dd..4ca4d2b 100644 --- a/pkg/game/features.go +++ b/pkg/game/features.go @@ -1,13 +1,10 @@ package game type FeatureFlags struct { - EnableDeckSelection bool } func defaultFeatureFlags() FeatureFlags { - return FeatureFlags{ - EnableDeckSelection: false, - } + return FeatureFlags{} } type codeControlFlags struct { diff --git a/pkg/game/game.go b/pkg/game/game.go index 9812d49..e45dbb2 100644 --- a/pkg/game/game.go +++ b/pkg/game/game.go @@ -654,9 +654,6 @@ func (g *Game) hiddenCurrentState() *protocol.State { } func (g *Game) SetDeck(deck protocol.Deck) error { - if !g.features.EnableDeckSelection { - return errors.New("deck selection is disabled") - } if !g.isDealer { return errors.New("only dealer can set deck") } diff --git a/pkg/game/options.go b/pkg/game/options.go index 137995a..4f9c5ef 100644 --- a/pkg/game/options.go +++ b/pkg/game/options.go @@ -79,9 +79,3 @@ func WithAutoReveal(enabled bool, delay time.Duration) Option { g.config.AutoRevealDelay = delay } } - -func WithFeatureDeckSelection(enabled bool) Option { - return func(g *Game) { - g.features.EnableDeckSelection = enabled - } -} diff --git a/pkg/game/options_test.go b/pkg/game/options_test.go index 24121b7..1f8570f 100644 --- a/pkg/game/options_test.go +++ b/pkg/game/options_test.go @@ -29,7 +29,6 @@ func TestOptions(t *testing.T) { publishStateLoop := gofakeit.Bool() autoRevealEnabled := gofakeit.Bool() autoRevealDelay := time.Duration(gofakeit.Int64()) - enableDeckSelection := gofakeit.Bool() options := []Option{ WithContext(ctx), @@ -43,7 +42,6 @@ func TestOptions(t *testing.T) { WithStateMessagePeriod(stateMessagePeriod), WithPublishStateLoop(publishStateLoop), WithAutoReveal(autoRevealEnabled, autoRevealDelay), - WithFeatureDeckSelection(enableDeckSelection), } game := NewGame(options) @@ -60,7 +58,6 @@ func TestOptions(t *testing.T) { require.Equal(t, publishStateLoop, game.config.PublishStateLoopEnabled) require.Equal(t, autoRevealEnabled, game.config.AutoRevealEnabled) require.Equal(t, autoRevealDelay, game.config.AutoRevealDelay) - require.Equal(t, enableDeckSelection, game.features.EnableDeckSelection) } func TestNoTransport(t *testing.T) {