--
-- * Pure showing functions
--

-- | String representation of a transcript.
showTranscript :: (Game g, Show (Move g)) =>
  ByPlayer (Player g) -> Transcript (Move g) -> String
showTranscript ps = unlines . map mv . reverse
  where mv (Just i,  m) = "  " ++ show (forPlayer i ps) ++ "'s move: " ++ show m
        mv (Nothing, m) = "  Chance: " ++ show m

-- | String representation of a move summary.
showTranscript :: (Game g, Show (Move g)) =>
  ByPlayer (Player g) -> Transcript (Move g) -> String
showTranscript ps = unlines . map mv . reverse
  where mv (Just i,  m) = "  " ++ show (forPlayer i ps) ++ "'s move: " ++ show m
        mv (Nothing, m) = "  Chance: " ++ show m

-- | String representation of a move summary.
showTranscript ps = unlines . map mv . reverse
  where mv (Just i,  m) = "  " ++ show (forPlayer i ps) ++ "'s move: " ++ show m
        mv (Nothing, m) = "  Chance: " ++ show m

-- | String representation of a move summary.