From d034b9c9273a7f3ff91554c4b605dd488207caa1 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Mon, 9 Jan 2023 11:08:02 +0800 Subject: Display player's cards in color --- Color.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Color.hs (limited to 'Color.hs') diff --git a/Color.hs b/Color.hs new file mode 100644 index 0000000..1d63fcd --- /dev/null +++ b/Color.hs @@ -0,0 +1,13 @@ +module Color where + +red :: String -> String +red s = "\x001b[31m" ++ s ++ "\x001b[0m" + +green :: String -> String +green s = "\x001b[32m" ++ s ++ "\x001b[0m" + +yellow :: String -> String +yellow s = "\x001b[33m" ++ s ++ "\x001b[0m" + +blue :: String -> String +blue s = "\x001b[34m" ++ s ++ "\x001b[0m" -- cgit v1.2.3