commit 70b81f683ce1873ec23f4106972a05d4e3329c6a
Author: Simon Watson <simon.watson@ipc.com>
Date: Tue Oct 12 10:12:43 2021 -0400
Messing around
diff --git a/ascii-assets.lisp b/ascii-assets.lisp
index 2a2ebb8..6a8eb0e 100644
--- a/ascii-assets.lisp
+++ b/ascii-assets.lisp
@@ -9,3 +9,20 @@
████████▀ █████▄▄██ ▀███▀███▀ ███ █▀ ███ ███ ▄████████▀
▀ ███ ███
")
+
+(defvar *intro-ship* "
+. , . * - . . , , . . - * . .
+ . / . . . * ,
+ * , - * . * . _ . , . , . .
+- , . ; . , ,, . . * . . .
+ . * ; . __________________ * , . +
+* ^ . , * | | \ ., * .. . , . . -
+ . , * * * | |____\
+ , . * * * | /
+ * |__________________/
+ ___ | /
+/ \ | /
+ \ | /---++
+ / |/----++
+\ __ /
+")
diff --git a/clwars.lisp b/clwars.lisp
index 5fb88f6..17e45c7 100644
--- a/clwars.lisp
+++ b/clwars.lisp
@@ -2,6 +2,9 @@
(load "~/Repos/clwars/structs.lisp")
(load "~/Repos/clwars/game.lisp")
+(defun reload()
+ (load "~/Repos/clwars/clwars.lisp"))
+
;; https://stackoverflow.com/questions/4882361/which-command-could-be-used-to-clear-screen-in-clisp
(defun cls()
(format t "~A[H~@*~A[J" #\escape))
@@ -13,6 +16,8 @@
(defun main ()
(format t *menu-splash*)
- (format t "Press any key to start")
- (prompt-read "")
- (cls))
+ (format t "Press any key to start or q to quit: ")
+ (if (string-not-equal (prompt-read "") "q")
+ (progn
+ (cls)
+ (new-game))))
diff --git a/game.lisp b/game.lisp
index d5d423d..a1b7ec7 100644
--- a/game.lisp
+++ b/game.lisp
@@ -35,7 +35,7 @@
:credits 1000
:crew (make-crew :sanity-val 100
:moral-val 100
- :crew-members (list))
+ :crew-members (list (make-uniq-crew-mem)))
:inventory (make-player-inventory :petrofuel 20
:gruel 20
:spice 0
@@ -43,9 +43,30 @@
:archeotech 0)))))
+(defun new-game ()
+ (progn
+ (init-game-state)))
+(defun game-intro ()
+ (cls)
+ (format t "In the grim darkness of the far future, there is only COMMERCE...~C" #\linefeed)
+ (sleep 2)
+ (format t "You embark across a bleak galaxy to ply your wares and discover untold riches!~C" #\linefeed)
+ (sleep 2)
+ (format t *intro-ship*)
+ (prompt-read ""))
+;; Options for top level menu
+(defvar *top-level-options* "
+Actions:
+1. Sector info
+2. Ship info
+3. Trade
+4. Scout
+5. Leave
+")
-
-
-
+(defun top-level-game-menu ()
+ (format t *top-level-options*)
+ (let ((option (prompt-read "Enter an option: "))
+ (cond ((eql option '"1") (print "1"))))))
diff --git a/structs.lisp b/structs.lisp
index 0317b96..5859c77 100644
--- a/structs.lisp
+++ b/structs.lisp
@@ -50,4 +50,3 @@
price-of-archeotech
price-of-spice
price-of-gruel)
-