Changed the separator character '#'

This commit is contained in:
VegOwOtenks 2024-10-18 10:00:54 +02:00
parent c38aa04143
commit c4860e60b7

View file

@ -28,13 +28,13 @@ parseInputLine :: Int -> String -> Either ParseError Expression
parseInputLine n s = parseFullString ("stdin:" ++ show n) s
title :: [String] -> String
title ns = " " ++ intercalate " | " ns
title ns = " " ++ intercalate " # " ns
header :: [Int] -> String
header ws = intercalate "|" . map (flip replicate '-' . (+2) ) $ ws
header ws = intercalate "#" . map (flip replicate '#' . (+2) ) $ ws
row :: [Int] -> [Bool] -> String
row ws rs = intercalate "|" $ (zipWith row' ws rs)
row ws rs = intercalate "#" $ (zipWith row' ws rs)
where
row' :: Int -> Bool -> String
row' w b = replicate (left+1) ' ' ++ (if b then "1" else "0") ++ replicate (right+1) ' '