implemented rendering of left side of abacus widget

This commit is contained in:
2024-08-21 20:14:32 -04:00
parent 3130cef356
commit 475b1ed05c
6 changed files with 181 additions and 1 deletions

View File

@@ -36,11 +36,21 @@ module Abacus.App.Widgets.Internal (
abacusRight,
) where
import Lens.Micro.Platform ((^.))
import Abacus
import Abacus.App.Types
abacusLeft :: AppState -> [String]
abacusLeft = undefined
abacusLeft s =
" " : map
(\n -> mark n : show n)
[0..pred (getNumRungs $ s^.abacus)]
++ [" "]
where
mark n = if n == s^.rungNum
then '>'
else ' '
beads :: Abacus -> [(String, String)]
beads = undefined