summaryrefslogtreecommitdiff
path: root/app/Example/CircleThatMoves.hs
diff options
context:
space:
mode:
authorMikkel Thestrup <mithe24@student.sdu.dk>2025-12-25 15:26:43 +0100
committerMikkel Thestrup <mithe24@student.sdu.dk>2025-12-25 15:26:43 +0100
commit202dac1dad3d86960af49d38eff0c690bf932a2c (patch)
treedb697d81df8facd08bc61e9cc43ab0c129853111 /app/Example/CircleThatMoves.hs
parentb9a23720c7ebe67f84bec0af147fca9b132525ac (diff)
downloadscratchy-202dac1dad3d86960af49d38eff0c690bf932a2c.tar.gz
scratchy-202dac1dad3d86960af49d38eff0c690bf932a2c.zip
Feat(CircleThatMoves): Added horizontal movement
Diffstat (limited to '')
-rw-r--r--app/Example/CircleThatMoves.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Example/CircleThatMoves.hs b/app/Example/CircleThatMoves.hs
index 9d9aa8b..d173a3d 100644
--- a/app/Example/CircleThatMoves.hs
+++ b/app/Example/CircleThatMoves.hs
@@ -16,4 +16,12 @@ circSprite = NewSprite
( OnTargetReached s
(\cl -> SetTarget s (nextCell D cl) (Pure ()))
$ Pure () )
+ $ OnKeyEvent (Char 'a')
+ ( OnTargetReached s
+ (\cl -> SetTarget s (nextCell L cl) (Pure ()))
+ $ Pure () )
+ $ OnKeyEvent (Char 'd')
+ ( OnTargetReached s
+ (\cl -> SetTarget s (nextCell R cl) (Pure ()))
+ $ Pure () )
$ Pure ())