;;; boot.scm

(define last-level #f)
(define return-level #f)

(define (nth n l)
  (if (= 0 n) (car l) (nth (- n 1) (cdr l))))
(define (multi-pipe coords radius connectors)
  (let ((p0 (nth 0 coords))
		(p1 (nth 1 coords)))
	(if (= (length coords) 2)
		(list (pipe (nth 0 p0) (nth 1 p0) (nth 2 p0) (nth 0 p1) (nth 1 p1) (nth 2 p1) radius))
		(cons (pipe (nth 0 p0) (nth 1 p0) (nth 2 p0) (nth 0 p1) (nth 1 p1) (nth 2 p1) radius)
			  (if connectors 
				  (cons (pipe-connector (nth 0 p1) (nth 1 p1) (nth 2 p1) radius)
						(multi-pipe (cdr coords) radius connectors))
				  (multi-pipe (cdr coords) radius connectors))))))
				  
