From cfb92b1b4bb2f28b97fbc8252d2fe0ee807da55b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 7 Sep 2022 23:12:15 -0500 Subject: Theming --- potato.scm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/potato.scm b/potato.scm index 68d0f2c..74ceaa3 100755 --- a/potato.scm +++ b/potato.scm @@ -36,6 +36,11 @@ exec csi -s $0 "$@" ;;; UI +(define (clear-screen) + (display #\escape) + (display "[2J") + (newline)) + (define (prln . strs) (apply string-append (append (intersperse @@ -164,6 +169,13 @@ exec csi -s $0 "$@" (set! potatoes 0) (set! orcs 0) (set! orc-cost 1) + + (clear-screen) + (display (prln " P O T A T O " + " ~ story by @deathbybadger" + " ~ game by @caseofducks")) + (newline) + (display (prln "You are a halfling, just trying to exist." "Meanwhile, the dark lord rampages across the world." "You do not care about this. You are trying to farm potatoes." @@ -181,9 +193,9 @@ exec csi -s $0 "$@" "wizard" "bard"))) (display - (prln `("An interfering " interloper " turns up at your doorstep with a quest." - "You are whisked away against your will on an adventure, where" - "you will probably be eaten by orcs."))))) + (prln `("An interfering " interloper " turns up at your doorstep with a quest.") + "You are whisked away against your will on an adventure.." + "where you will probably be eaten by orcs.")))) ('orcs (display (prln "Orcs have found your potato farm." @@ -195,8 +207,9 @@ exec csi -s $0 "$@" ((>= potatoes 10) 'potatoes) ((>= destiny 10) 'destiny) ((>= orcs 10) 'orcs) - (else (let ((desc (event))) - (display-columns (scores) desc)) + (else (clear-screen) + (let ((desc (event))) + (display-columns (scores) desc)) (newline) (when (and (> orcs 0) -- cgit 1.4.1-21-gabe81