matchable
mars parser)
-(define CORE-SIZE 8000)
-(define GAMES-PER-MATCH 1)
(define INITIAL-INSTR (make-instr 'DAT 'F 'immediate 0 'immediate 0))
(define (file->prog file)
;;;; Main ;;;;
+;; Default values
+
+(define default-core-size 8000)
+(define default-game-length 80000)
+(define default-games-per-match 1)
+(define default-hill-size 10)
+
+
+
(define (print-usage)
(let ((binary (pathname-file (car (argv)))))
(print "King of the Hill Tournament Manager")
- (print "Usage:\t" binary " hill-directory challenger-file")
+ (print "\nUsage:\t" binary " hill-directory challenger-file")
(print "\t" binary " [-h|--help]")
- (print "\t" binary " [-i|--init] hill-directory [hill-size [core-size game-length games-per-match]]")))
+ (print "\t" binary " [-i|--init] hill-directory [hill-size [core-size game-length games-per-match]]")
+ (print "\nDefault values are as follows:\n"
+ "\thill-size: " default-hill-size "\n"
+ "\tcore-size: " default-core-size "\n"
+ "\tgame-length: " default-game-length "\n"
+ "\tgames-per-match: " default-games-per-match)))
(define (process-args args)
(match args
(((or "-i" "--init") dir hill-size core-size game-length games-per-match)
(init-hill-dir dir hill-size core-size game-length games-per-match))
(((or "-i" "--init") dir)
- (init-hill-dir dir 10 8000 80000 10))
+ (init-hill-dir dir
+ default-hill-size
+ default-core-size
+ default-game-length
+ default-games-per-match))
(((or "-i" "--init") dir hill-size)
- (init-hill-dir dir hill-size 8000 80000 10))
+ (init-hill-dir dir
+ hill-size
+ default-core-size
+ default-game-length
+ default-games-per-match))
((hill-dir challenger-file)
(print "Not implemented"))
(else