From af5305cc24dce10949974d5a1e1e48b5f248dbee Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Wed, 7 Dec 2022 10:40:50 -0800 Subject: [PATCH] add bigfont --- app/BigFont.hs | 237 ++++++++++++++++++++++++++++++++++++++ levels/infiniteExit10.txt | 16 +++ 2 files changed, 253 insertions(+) create mode 100644 app/BigFont.hs create mode 100644 levels/infiniteExit10.txt diff --git a/app/BigFont.hs b/app/BigFont.hs new file mode 100644 index 0000000..e13a811 --- /dev/null +++ b/app/BigFont.hs @@ -0,0 +1,237 @@ +module BigFont where + +import Data.Map qualified as Map +import Data.Map (Map) +import Data.Maybe +import Data.List (intersperse, transpose) + +bigText :: String -> [String] +bigText = map concat . transpose . intersperse sep . mapMaybe \x -> Map.lookup x letters + +sep :: [String] +sep = [" " ," " ," " ," " ," "] + +letters :: Map Char [String] +letters = Map.fromList + [(' ', + [" " + ," " + ," " + ," " + ," "]), + ('A', + [" █████ " + ,"██ ██" + ,"███████" + ,"██ ██" + ,"██ ██"]), + ('B', + ["██████ " + ,"██ ██" + ,"██████ " + ,"██ ██" + ,"██████ "]), + ('C', + [" ██████" + ,"██ " + ,"██ " + ,"██ " + ," ██████"]), + ('D', + ["██████ " + ,"██ ██" + ,"██ ██" + ,"██ ██" + ,"██████ "]), + ('E', + ["███████" + ,"██ " + ,"█████ " + ,"██ " + ,"███████"]), + ('F', + ["███████" + ,"██ " + ,"█████ " + ,"██ " + ,"██ "]), + ('G', + [" ██████ " + ,"██ " + ,"██ ███" + ,"██ ██" + ," ██████ "]), + ('H', + ["██ ██" + ,"██ ██" + ,"███████" + ,"██ ██" + ,"██ ██"]), + ('I', + ["██" + ,"██" + ,"██" + ,"██" + ,"██"]), + ('J', + [" ██" + ," ██" + ," ██" + ,"██ ██" + ," █████ "]), + ('K', + ["██ ██" + ,"██ ██ " + ,"█████ " + ,"██ ██ " + ,"██ ██"]), + ('L', + ["██ " + ,"██ " + ,"██ " + ,"██ " + ,"███████"]), + ('M', + ["███ ███" + ,"████ ████" + ,"██ ████ ██" + ,"██ ██ ██" + ,"██ ██"]), + ('N', + ["███ ██" + ,"████ ██" + ,"██ ██ ██" + ,"██ ██ ██" + ,"██ ████"]), + ('O', + [" ██████ " + ,"██ ██" + ,"██ ██" + ,"██ ██" + ," ██████ "]), + ('P', + ["██████ " + ,"██ ██" + ,"██████ " + ,"██ " + ,"██ "]), + ('Q', + [" ██████ " + ,"██ ██" + ,"██ ██" + ,"██ ▄▄ ██" + ," ██████ "]), + ('R', + ["██████ " + ,"██ ██" + ,"██████ " + ,"██ ██" + ,"██ ██"]), + ('S', + ["███████" + ,"██ " + ,"███████" + ," ██" + ,"███████"]), + ('T', + ["████████" + ," ██ " + ," ██ " + ," ██ " + ," ██ "]), + ('U', + ["██ ██" + ,"██ ██" + ,"██ ██" + ,"██ ██" + ," ██████ "]), + ('V', + ["██ ██" + ,"██ ██" + ,"██ ██" + ," ██ ██ " + ," ████ "]), + ('W', + ["██ ██" + ,"██ ██" + ,"██ █ ██" + ,"██ ███ ██" + ," ███ ███ "]), + ('X', + ["██ ██" + ," ██ ██ " + ," ███ " + ," ██ ██ " + ,"██ ██"]), + ('Y', + ["██ ██" + ," ██ ██ " + ," ████ " + ," ██ " + ," ██ "]), + ('Z', + ["███████" + ," ███ " + ," ███ " + ," ███ " + ,"███████"]), + ('0', + [" ██████ " + ,"██ ████" + ,"██ ██ ██" + ,"████ ██" + ," ██████ "]), + ('1', + [" ██" + ,"███" + ," ██" + ," ██" + ," ██"]), + ('2', + ["██████ " + ," ██" + ," █████ " + ,"██ " + ,"███████"]), + ('3', + ["██████ " + ," ██" + ," █████ " + ," ██" + ,"██████ "]), + ('4', + ["██ ██" + ,"██ ██" + ,"███████" + ," ██" + ," ██"]), + ('5', + ["███████" + ,"██ " + ,"███████" + ," ██" + ,"███████"]), + ('6', + [" ██████ " + ,"██ " + ,"███████ " + ,"██ ██" + ," ██████ "]), + ('7', + ["███████" + ," ██" + ," ██ " + ," ██ " + ," ██ "]), + ('8', + [" █████ " + ,"██ ██" + ," █████ " + ,"██ ██" + ," █████ "]), + ('9', + [" █████ " + ,"██ ██ " + ," ██████ " + ," ██ " + ," █████ "])] diff --git a/levels/infiniteExit10.txt b/levels/infiniteExit10.txt new file mode 100644 index 0000000..f1e27f2 --- /dev/null +++ b/levels/infiniteExit10.txt @@ -0,0 +1,16 @@ +player p +block a yellow interesting + ▓▓▓▓ + p ▓ ▓▓ + ∞▓▓ + - ▓ + - ▓▓▓ + = + a +infinity ∞ a yellow +block p magenta boring +▓▓▓▓▓ +▓ ▓ ▓ +▓▓▓▓▓ +▓▓▓▓▓ +▓▓▓▓▓