From 76daa637ffa61e0fd8532850272eb3d051eff48f Mon Sep 17 00:00:00 2001 From: plugd Date: Mon, 11 May 2020 14:45:05 +0200 Subject: [PATCH] Tiny changes, made note of bug in SPL. --- NOTES.org | 4 ++++ koth.scm | 3 +-- parser.scm | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NOTES.org b/NOTES.org index 00eceb7..9239397 100644 --- a/NOTES.org +++ b/NOTES.org @@ -1,5 +1,9 @@ #+TITLE: Development notes for Corewar +* MARS + +** TODO Debug SPL instruction behaviour. + * Load file parsing ** DONE Use strings for program names diff --git a/koth.scm b/koth.scm index a9c1a84..45e4bb8 100644 --- a/koth.scm +++ b/koth.scm @@ -227,10 +227,9 @@ (if (null? rankings) (print "No warriors on hill!") (begin - (print rankings) (print "Warrior" "\t" "Score") (print "-=-=-=-" "\t" "=-=-=") - (for-each (lambda (r) (print (car r) "\t" (cadr r))) rankings))))) + (for-each (lambda (r) (print (car r) "\t\t" (cadr r))) rankings))))) ((hill-dir challenger-file) (challenge hill-dir challenger-file)) (else diff --git a/parser.scm b/parser.scm index f116033..c112cf9 100644 --- a/parser.scm +++ b/parser.scm @@ -15,7 +15,7 @@ (newline-irx (irregex "^\n")) (comma-irx (irregex "^,")) (period-irx (irregex "^\\.")) - (redcode-irx (irregex "^;redcode\n")) + (redcode-irx (irregex "^;redcode.*\n")) (name-start-irx (irregex "^;[ \t]*name ")) (name-irx (irregex "^[^\n]*")) (author-start-irx (irregex "^;[ \t]*author ")) -- 2.20.1