Implement hard drop and improve Translatable class

This commit is contained in:
Sam Tay 2017-06-17 20:30:19 -04:00
parent 7b82d01dd1
commit 756fb97414
2 changed files with 20 additions and 6 deletions

View file

@ -57,6 +57,7 @@ handleEvent g (AppEvent Tick) = liftIO (timeStep g) >>= co
handleEvent g (VtyEvent (V.EvKey V.KRight [])) = continue $ shift Right g
handleEvent g (VtyEvent (V.EvKey V.KLeft [])) = continue $ shift Left g
handleEvent g (VtyEvent (V.EvKey V.KDown [])) = continue $ shift Down g
handleEvent g (VtyEvent (V.EvKey (V.KChar ' ') [])) = continue $ hardDrop g
handleEvent g (VtyEvent (V.EvKey V.KUp [])) = continue $ rotate g
handleEvent g (VtyEvent (V.EvKey (V.KChar 'q') [])) = halt g
handleEvent g (VtyEvent (V.EvKey V.KEsc [])) = halt g