lists no more needed
* src/system.scm: entities/components functions now return a function
for changing the entity/component structure
* src/test.scm: functions testing adapted to new scheme
(lambda* (#:optional (entities2 #f) (components2 #f))
(let ((e (if (and entities2 components2) entities2 entities))
(c (if (and entities2 components2) components2 components)))
- (set-entities res e c))))))
+ (modify-entities res e c))))))
(define (join-systems . systems)
(define (test2)
(let ((entities '())
(components '()))
- (receive (e c) (((make-system '() (lambda (e) `((#f . (,(make-a 1 2))) (#f . (,(make-a 10 20)))))) entities components))
+ (receive (e c) (((make-system '() (lambda (e) (list (new-entity (make-a 1 2)) (new-entity (make-a 10 20))))) entities components))
(set! entities e)
(set! components c))
(format #t "Two new entities with a:~%~a~%~a~%~%" entities components)