Use the Show instance of IDs to improve debug

This commit is contained in:
Tissevert 2019-12-26 19:31:43 +01:00
parent 0ea6fec5ae
commit 555e4386e3

View file

@ -5,7 +5,6 @@ module Player (
) where ) where
import Data.Text (Text) import Data.Text (Text)
import Hanafuda.ID (ID(..))
import Hanafuda.KoiKoi (PlayerID) import Hanafuda.KoiKoi (PlayerID)
import Text.Printf (printf) import Text.Printf (printf)
@ -15,4 +14,4 @@ data T = T {
} deriving (Show) } deriving (Show)
showDebug :: T -> String showDebug :: T -> String
showDebug (T {playerID, name}) = printf "%s (%d)" name (getID playerID) showDebug (T {playerID, name}) = printf "%s (%s)" name (show playerID)