aboutsummaryrefslogtreecommitdiff
path: root/src/Chelleport.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Chelleport.hs')
-rw-r--r--src/Chelleport.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Chelleport.hs b/src/Chelleport.hs
index 82188b9..cb0ed84 100644
--- a/src/Chelleport.hs
+++ b/src/Chelleport.hs
@@ -7,6 +7,8 @@ import Chelleport.KeySequence (eventToKeycode, findMatchPosition, generateGrid,
import Chelleport.Types
import Chelleport.Utils (intToCInt)
import qualified Chelleport.View
+import Data.List ((\\))
+import Data.Maybe (fromMaybe)
import qualified SDL
open :: IO ()
@@ -14,12 +16,12 @@ open = setupAppShell initialState update eventToAction Chelleport.View.render
initialState :: DrawContext -> IO State
initialState _ctx = do
- let cells = generateGrid (rows, columns) hintKeys
+ let cells = fromMaybe (pure undefined) $ generateGrid 0 (rows, columns) hintKeys
pure $ State {stateGrid = cells, stateKeySequence = []}
where
rows = 12
columns = 12
- hintKeys = "ABCDEFGHIJKLMNOPRSTUVWXYZ1234567890"
+ hintKeys = ['A' .. 'Z'] \\ "Q"
update :: Update State AppAction
update state _ctx (FilterSequence key) =