;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Main Game ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Main game starters. ;;; Start a game in a single-player mode. (define (single-game) (make-single-player) (event-loop)) ;;; Start a game in a multi-player mode. (define (multi-game n) (if (<= n 0) (event-loop) (begin (make-multi-player) (multi-game (sub1 n))))) ;;;===================================================================== ;;; These definitions makes life simpler with a server and a client. ;;; * Use (server) to start a server in one Swindle session (the console ;;; Swindle is better than the DrSwindle GUI environment). ;;; * Use (client) to start the client (also better in the console ;;; version). Note that this loads the whole game unnecessarily, but ;;; it doesn't take too much memory anyway... ;;; This saves the directory that was the whole game can be found at. (define *directory* (current-load-relative-directory)) ;;; Run the server - you only load the file and it will start. (define (server) (load (build-path *directory* "server.zo"))) ;;; Run the client - you only load the file and it will start. (define (client) (load (build-path *directory* "client.zo")))