first commit

This commit is contained in:
joren
2026-03-23 10:28:54 +01:00
commit 3abc9aae55
109 changed files with 2467 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#lang r7rs
; Main loop ADT ;
(define-library (pacman-project main-loop)
(import (scheme base)
(pacman-project screen)
(pacman-project pacman)
(pacman-project time-limit))
(export start-main-loop!
stop-main-loop!)
(begin
;stopt de game-loop
(define (stop-main-loop!)
((screen 'set-update-callback!)
(lambda (ms) (values))))
;start de game-loop
(define (start-main-loop!)
((screen 'set-update-callback!)
(lambda (ms)
(cond
((time-up?) ;wanneer de tijd om is stopt het spel
(stop-main-loop!))
(else
(animate-pacman! ms)
(decrease-time-limit! ms))))))))