Commit graph

73 commits

Author SHA1 Message Date
Sam Tay
37eb8a514c
Implement leveling 2024-10-19 19:17:43 -04:00
Sam Tay
e8c6c804c5
Refactor 2024-05-06 13:39:16 -04:00
Sam Tay
bcd6b38978
Bump to lts-22.19 and brick-2.1.1 2024-05-06 12:33:41 -04:00
Sam Tay
e271067771
Update stack lts to 20.1 2022-11-28 16:50:52 -08:00
Sam Tay
e3605d48f3 Update stack lts to 17.9 2021-04-17 22:30:44 -04:00
Willem Van Onsem
63ff896642
resolve merge conflict 2021-03-17 21:28:09 +01:00
Sam Tay
361eb0a221
Merge pull request from hapytex/improvement/redundant-dollar-2
remove redundant $s in Game.hs
2021-03-16 09:38:29 -04:00
Sam Tay
1ddcd856a3
Merge pull request from hapytex/improvement/redundant-dollar
Remove redundant $ by repositioning parenthesis
2021-03-16 09:38:05 -04:00
Willem Van Onsem
d162cffc8b
remove redundant $s in Game.hs 2021-03-16 00:06:22 +01:00
Willem Van Onsem
76f9007dc2
remove redundant $ in Game.hs 2021-03-16 00:03:06 +01:00
Willem Van Onsem
1cdeaa759b
remove redundant $ in Tetris.hs 2021-03-16 00:01:25 +01:00
Willem Van Onsem
ffd621f36a
remove redundant .^ in Game.hs 2021-03-15 23:49:15 +01:00
Willem Van Onsem
70270dbbce
remove redundant .^ in Tetris.hs 2021-03-15 23:47:38 +01:00
Willem Van Onsem
9f971cb159
remove redundant brackets in Game.hs 2021-03-15 23:45:26 +01:00
Willem Van Onsem
f57fa64bfb
remove redundant brackets in Tetris.hs 2021-03-15 23:44:15 +01:00
Sam Tay
8f506c37ba Simplify drawing cells
And only compute the hard drop preview when requested
2019-03-14 19:10:36 -04:00
Sam Tay
bac99ab3c8 Allow hiding preview cells - closes 2019-03-14 19:09:50 -04:00
Sam Tay
fe55e493f1 Remove unnecessary variable 2018-12-28 23:54:54 -05:00
Sam Tay
fb853a61c7 Refactor UI 2018-12-27 15:42:38 -05:00
Sam Tay
33f5175595 Add pause feature, closes 2018-12-27 13:12:28 -05:00
Sam Tay
b3d812bee5 Formatting only 2018-12-27 12:17:01 -05:00
Sam Tay
ccbd9d8e36 Rename "frozen" -> "locked", better semantics 2018-12-27 10:43:20 -05:00
Sam Tay
ad1fcf9192 Refactor game state computation
Cleaning up the Tetris module, mainly to favor a MonadState style over
explicit `Game -> Game` functions, which were a little awkward. This also
led naturally to explicitly isolating `IO`, by having pure state modifiers
with types like `Tetris a ~ forall m. StateT Game m a` being executed
with `m ~ Identity`, and those few modifiers that need IO specified by
`TetrisT a ~ StateT Game IO a`.
2018-12-27 10:28:26 -05:00
Sam Tay
09de01695c Clean up, use std lib functions 2018-12-26 20:26:30 -05:00
Sam Tay
5b8d419b24 Use explicit exports 2018-12-26 20:18:32 -05:00
Sam Tay
a594680852 Formatting only 2018-12-26 19:57:05 -05:00
Sam Tay
4f9bcfca34 Add restart option 2017-07-03 00:44:18 -04:00
Sam Tay
6a3764fa9a Fix rotating I shapes 2017-07-03 00:44:18 -04:00
Sam Tay
2891f7883c Implement custom hard drop previews 2017-07-02 19:02:24 -04:00
Sam Tay
8e2240c87c Add cli opts for score, level, and restricting unicode 2017-07-02 17:47:21 -04:00
Sam Tay
2c150c7b27 Use Linear.V2 instead of tuples 2017-07-02 00:46:16 -04:00
Sam Tay
a51da284f1 Disallow shifting after hard drop 2017-06-27 23:56:19 -04:00
Sam Tay
ffa4a5b6b9 Update README with some unix porn 2017-06-18 19:16:00 -04:00
Sam Tay
6b24b54cb5 Fix bug in hard drop 2017-06-18 19:10:12 -04:00
Sam Tay
06c91e4a2b Add hard drop in help and remove semicolons 2017-06-18 17:05:53 -04:00
Sam Tay
94bc6c444b Add hard drop preview
Really annoying to have all these new attributes flying around. The code
would take like 2 lines if I could figure out how to reference the
default bg color from vty..
2017-06-18 16:39:46 -04:00
Sam Tay
87b8e05919 Add GAME OVER callout 2017-06-18 14:58:00 -04:00
Sam Tay
4936597ae2 Add help section and support vim bindings 2017-06-18 14:39:00 -04:00
Sam Tay
a0117d3bb1 Update TODOs 2017-06-18 00:52:51 -04:00
Sam Tay
8361b3464a Improve visuals 2017-06-18 00:25:24 -04:00
Sam Tay
ddbf411d49 Fix freezing issue 2017-06-17 21:51:33 -04:00
Sam Tay
2bc72a0e94 Format, remove unnecessary verbosity 2017-06-17 21:33:01 -04:00
Sam Tay
e64715d051 Fix clockwise rotation 2017-06-17 21:30:57 -04:00
Sam Tay
ef6ed845c2 Swap return -> pure because its better 2017-06-17 20:42:56 -04:00
Sam Tay
80e71eb859 Applicative functions 2017-06-17 20:39:40 -04:00
Sam Tay
349022a7cc Clean up some funcs 2017-06-17 20:30:37 -04:00
Sam Tay
756fb97414 Implement hard drop and improve Translatable class 2017-06-17 20:30:19 -04:00
Sam Tay
7b82d01dd1 Only keep consecutive rowClears 2017-06-17 17:11:22 -04:00
Sam Tay
dcacb9bf73 Make visuals a tad clearer with a poor man's grid 2017-06-17 17:00:51 -04:00
Sam Tay
f2327fc3c5 Implement level to gravity delay 2017-06-17 17:00:08 -04:00