diff options
Diffstat (limited to 'app/Example')
| -rw-r--r-- | app/Example/CircleThatMoves.hs | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/app/Example/CircleThatMoves.hs b/app/Example/CircleThatMoves.hs index d173a3d..077ee1e 100644 --- a/app/Example/CircleThatMoves.hs +++ b/app/Example/CircleThatMoves.hs @@ -8,20 +8,25 @@ circSprite = NewSprite (15,15) (Color green $ circleSolid (cellSize * 0.6)) (\s -> - OnKeyEvent (Char 'w') - ( OnTargetReached s - (\cl -> SetTarget s (nextCell U cl) (Pure ())) - $ Pure () ) - $ OnKeyEvent (Char 's') - ( 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 ()) + OnKeyEvent (Char 'w') + ( OnTargetReached s + (\cl -> SetTarget s (nextCell U cl) (Pure ())) $ + Pure () + ) $ + OnKeyEvent (Char 's') + ( 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 () + ) |