diff --git a/elm.json b/elm.json index a1e4fda..f1ac32f 100644 --- a/elm.json +++ b/elm.json @@ -8,7 +8,6 @@ "direct": { "NoRedInk/elm-json-decode-pipeline": "1.0.0", "carwow/elm-slider": "11.1.6", - "drathier/elm-test-tables": "3.0.0", "elm/browser": "1.0.2", "elm/core": "1.0.5", "elm/html": "1.0.0", @@ -22,7 +21,6 @@ "elm-community/maybe-extra": "5.2.0", "elm-community/random-extra": "3.2.0", "elm-community/result-extra": "2.4.0", - "elm-explorations/test": "1.2.2", "grotsev/elm-debouncer": "1.0.0", "krisajenkins/remotedata": "6.0.1", "myrho/elm-round": "1.0.4", @@ -39,9 +37,10 @@ } }, "test-dependencies": { - "direct": {}, - "indirect": { - "elm/regex": "1.0.0" - } + "direct": { + "drathier/elm-test-tables": "3.0.0", + "elm-explorations/test": "1.2.2" + }, + "indirect": {} } } diff --git a/src/Api.elm b/src/Api.elm index d7dc139..7cf1298 100644 --- a/src/Api.elm +++ b/src/Api.elm @@ -7,9 +7,6 @@ import Maybe.Extra import Model exposing (ApiResponse, Msg(..)) import Poker.Card as Card exposing (Card) import Poker.HandOrCombo as HandOrCombo exposing (HandOrCombo) -import Poker.Position exposing (Position(..)) -import Poker.Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) import Process import RemoteData import Task diff --git a/src/Form.elm b/src/Form.elm index 8b4fb77..1b07775 100644 --- a/src/Form.elm +++ b/src/Form.elm @@ -25,7 +25,7 @@ import List.Extra import Maybe.Extra import Poker.Board as Board import Poker.Card as Card exposing (Card) -import Poker.CardRemoval as CardRemoval exposing (numberOfCombos) +import Poker.CardRemoval as CardRemoval import Poker.HandOrCombo as HandOrCombo exposing (HandOrCombo) import Poker.Position as Position exposing (Position(..)) import Result.Extra diff --git a/src/Form/Field.elm b/src/Form/Field.elm index a7ff260..ffaa340 100644 --- a/src/Form/Field.elm +++ b/src/Form/Field.elm @@ -1,4 +1,4 @@ -module Form.Field exposing (Field, Validated, apply, clear, rewrite, setEdited, setValue) +module Form.Field exposing (Field, Validated, apply, clear, rewrite, setValue) type alias Error = @@ -32,11 +32,6 @@ setValue f value field = { field | value = value, validated = f value, edited = String.isEmpty value |> not } -setEdited : Field a -> Field a -setEdited field = - { field | edited = True } - - clear : a -> Field a -> Field a clear default field = { field | edited = False, value = "", validated = Ok default } diff --git a/src/Model.elm b/src/Model.elm index ce7a34e..5d16864 100644 --- a/src/Model.elm +++ b/src/Model.elm @@ -7,14 +7,10 @@ module Model exposing , ResultLine , SharingPopoverStates , SimulationResult - , allRangesExcept - , board , init - , initialPopoverStates , initialRangeSlider , initialSharingPopoverStates , popoverState - , range , urlParser ) @@ -32,9 +28,9 @@ import Poker.Card exposing (Card) import Poker.Combo exposing (Combo) import Poker.Hand exposing (Hand) import Poker.HandOrCombo exposing (HandOrCombo) -import Poker.Position as Position exposing (Position(..)) -import Poker.Suit as Suit exposing (Suit(..)) -import Ports exposing (CopiedToClipboardMsg, SharingType(..)) +import Poker.Position exposing (Position(..)) +import Poker.Suit as Suit exposing (Suit) +import Ports exposing (CopiedToClipboardMsg, SharingType) import RemoteData exposing (WebData) import Url exposing (Url) import Url.Parser as UrlParser exposing ((), Parser) @@ -331,20 +327,3 @@ popoverState position model = BB -> model.popoverStateBb - - -board : Model -> List Card -board model = - model.form |> Form.board - - -range : Position -> Model -> List HandOrCombo -range position model = - model.form |> Form.range position - - -allRangesExcept : Position -> Model -> List (List HandOrCombo) -allRangesExcept position model = - Position.all - |> List.filter ((/=) position) - |> List.map (\p -> range p model) diff --git a/src/Subscriptions.elm b/src/Subscriptions.elm index 5cbe72b..0988369 100644 --- a/src/Subscriptions.elm +++ b/src/Subscriptions.elm @@ -6,7 +6,7 @@ import Json.Decode as Decode import Keyboard import Model exposing (Model, Msg(..)) import Poker.Position exposing (Position(..)) -import Ports exposing (SharingType(..)) +import Ports subscriptions : Model -> Sub Msg diff --git a/src/Update.elm b/src/Update.elm index ab8ed05..2e4d425 100644 --- a/src/Update.elm +++ b/src/Update.elm @@ -19,7 +19,7 @@ import Poker.Combo as Combo import Poker.Hand as Hand exposing (Hand) import Poker.HandOrCombo as HandOrCombo import Poker.Position as Position exposing (Position(..)) -import Poker.Suit as Suit exposing (Suit(..)) +import Poker.Suit as Suit import Ports exposing (SharingType(..)) import Random import RemoteData exposing (WebData) diff --git a/src/View.elm b/src/View.elm index 99e3db1..436fb6e 100644 --- a/src/View.elm +++ b/src/View.elm @@ -25,11 +25,8 @@ import Html.Attributes import Html.Events import Kofi import Model exposing (Model, Msg(..), ResultLine) -import Poker.Card as Card import Poker.Position exposing (Position(..)) import Poker.Ranges as Ranges -import Poker.Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) import RemoteData import Result.Extra import Round diff --git a/src/Views/Board.elm b/src/Views/Board.elm index 4b94fd5..b052575 100644 --- a/src/Views/Board.elm +++ b/src/Views/Board.elm @@ -3,11 +3,8 @@ module Views.Board exposing (view) import Bootstrap.Utilities.Flex as Flex import Html exposing (Html) import Html.Attributes -import Model exposing (Msg(..)) +import Model exposing (Msg) import Poker.Card exposing (Card) -import Poker.Position exposing (Position(..)) -import Poker.Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) import Views.Card exposing (SelectState(..)) diff --git a/src/Views/Card.elm b/src/Views/Card.elm index 6c2563c..0ddc49e 100644 --- a/src/Views/Card.elm +++ b/src/Views/Card.elm @@ -7,7 +7,6 @@ import Model exposing (Msg(..)) import Poker.Card exposing (Card) import Poker.Rank as Rank import Poker.Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) import Svg import Svg.Attributes import Views.Icons diff --git a/src/Views/Modal/Board.elm b/src/Views/Modal/Board.elm index 899ae11..271329f 100644 --- a/src/Views/Modal/Board.elm +++ b/src/Views/Modal/Board.elm @@ -7,10 +7,8 @@ import Html exposing (Html) import Html.Attributes import Model exposing (Model, Msg(..)) import Poker.Card exposing (Card) -import Poker.Position exposing (Position(..)) import Poker.Rank as Rank -import Poker.Suit as Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) +import Poker.Suit as Suit import Views.Card exposing (SelectState(..)) diff --git a/src/Views/Modal/Range.elm b/src/Views/Modal/Range.elm index 67a0a36..1828c65 100644 --- a/src/Views/Modal/Range.elm +++ b/src/Views/Modal/Range.elm @@ -3,7 +3,6 @@ module Views.Modal.Range exposing (SelectState(..), view) import Bootstrap.Alt.Modal as Modal import Bootstrap.Button as Button import Bootstrap.Dropdown as Dropdown -import Bootstrap.Form as Form import Bootstrap.Grid as Grid import Bootstrap.Utilities.Flex as Flex import Bootstrap.Utilities.Size as Size @@ -16,10 +15,9 @@ import Html.Attributes import Html.Events import Model exposing (Model, Msg(..)) import Poker.Hand as Hand exposing (Hand) -import Poker.Position as Position exposing (Position(..)) +import Poker.Position as Position import Poker.Ranges as Ranges -import Poker.Suit as Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) +import Poker.Suit as Suit exposing (Suit) import Round import Svg import Svg.Attributes diff --git a/src/Views/RangePercentageCardRemoval.elm b/src/Views/RangePercentageCardRemoval.elm index eab033f..4abd06e 100644 --- a/src/Views/RangePercentageCardRemoval.elm +++ b/src/Views/RangePercentageCardRemoval.elm @@ -1,4 +1,4 @@ -module Views.RangePercentageCardRemoval exposing (view, viewUnblocked, viewWithCardRemoval) +module Views.RangePercentageCardRemoval exposing (view, viewWithCardRemoval) import Bootstrap.Form as Form import Bootstrap.Progress as Progress @@ -6,12 +6,9 @@ import Bootstrap.Utilities.Spacing as Spacing import Form import Html exposing (Html) import Html.Attributes -import List.Extra -import Model exposing (Model, Msg(..)) -import Poker.Combo as Combo exposing (Combo) -import Poker.Position exposing (Position(..)) -import Poker.Suit exposing (Suit(..)) -import Ports exposing (SharingType(..)) +import Model exposing (Model, Msg) +import Poker.Combo as Combo +import Poker.Position exposing (Position) import Round @@ -24,11 +21,6 @@ viewWithCardRemoval edited position model = [] -viewUnblocked : List Combo -> List Combo -> List (Html Msg) -viewUnblocked combos blockers = - view (combos |> List.Extra.count (\combo -> List.member combo blockers |> not)) - - view : Int -> List (Html Msg) view numberOfCombos = let diff --git a/src/Views/Result.elm b/src/Views/Result.elm index be1e941..371d523 100644 --- a/src/Views/Result.elm +++ b/src/Views/Result.elm @@ -10,10 +10,8 @@ import Bootstrap.Utilities.Spacing as Spacing import Html import Html.Attributes import Model exposing (Msg(..), ResultLine, SharingPopoverStates, SimulationResult) -import Poker.Card as Card import Poker.HandOrCombo as HandOrCombo import Poker.Position as Position exposing (Position(..)) -import Poker.Suit exposing (Suit(..)) import Ports exposing (SharingType(..)) import Round import Views.Board diff --git a/tests/Poker/CardRemovalTests.elm b/tests/Poker/CardRemovalTests.elm index 791849d..da17391 100644 --- a/tests/Poker/CardRemovalTests.elm +++ b/tests/Poker/CardRemovalTests.elm @@ -1,7 +1,6 @@ module Poker.CardRemovalTests exposing (..) import Expect -import Fuzz exposing (..) import List.Extra import Poker.Card as Card exposing (Card) import Poker.CardRemoval as CardRemoval diff --git a/tests/Poker/CardTests.elm b/tests/Poker/CardTests.elm index 57aa563..a45d61f 100644 --- a/tests/Poker/CardTests.elm +++ b/tests/Poker/CardTests.elm @@ -1,7 +1,6 @@ module Poker.CardTests exposing (..) import Expect -import Fuzz exposing (..) import List.Extra import Parser import Poker.Card as Card diff --git a/tests/Poker/ComboTests.elm b/tests/Poker/ComboTests.elm index bdf0fac..28e34d9 100644 --- a/tests/Poker/ComboTests.elm +++ b/tests/Poker/ComboTests.elm @@ -1,7 +1,6 @@ module Poker.ComboTests exposing (..) import Expect -import Fuzz exposing (..) import List.Extra import Parser import Poker.Card exposing (Card) diff --git a/tests/Poker/Fuzzer.elm b/tests/Poker/Fuzzer.elm index 841a909..caebbca 100644 --- a/tests/Poker/Fuzzer.elm +++ b/tests/Poker/Fuzzer.elm @@ -5,7 +5,6 @@ import Poker.Combo as Combo exposing (Combo) import Random import Random.List import Shrink -import Test exposing (..) combos : Fuzzer (List Combo) diff --git a/tests/Poker/HandOrComboTests.elm b/tests/Poker/HandOrComboTests.elm index 228fb31..8e194b5 100644 --- a/tests/Poker/HandOrComboTests.elm +++ b/tests/Poker/HandOrComboTests.elm @@ -1,7 +1,6 @@ module Poker.HandOrComboTests exposing (..) import Expect -import Fuzz exposing (..) import List.Extra import Poker.Combo as Combo import Poker.Fuzzer as Fuzzer diff --git a/tests/Poker/HandTests.elm b/tests/Poker/HandTests.elm index 8939dfe..084d413 100644 --- a/tests/Poker/HandTests.elm +++ b/tests/Poker/HandTests.elm @@ -1,7 +1,6 @@ module Poker.HandTests exposing (..) import Expect -import Fuzz exposing (..) import Maybe.Extra import Parser import Poker.Card exposing (Card) diff --git a/tests/Poker/RankTests.elm b/tests/Poker/RankTests.elm index 27c7f5d..7133df9 100644 --- a/tests/Poker/RankTests.elm +++ b/tests/Poker/RankTests.elm @@ -3,7 +3,7 @@ module Poker.RankTests exposing (..) import Expect import Fuzz exposing (..) import Parser -import Poker.Rank as Rank exposing (Rank(..)) +import Poker.Rank as Rank import Result.Extra import Test exposing (..)