Simon Watson 2 سال پیش
والد
کامیت
ed3ee9df57
1فایلهای تغییر یافته به همراه37 افزوده شده و 0 حذف شده
  1. 37 0
      clwars.lisp

+ 37 - 0
clwars.lisp

@@ -0,0 +1,37 @@
+(defvar *menu-splash* "
+ ▄████████  ▄█        ▄█     █▄     ▄████████    ▄████████    ▄████████ 
+███    ███ ███       ███     ███   ███    ███   ███    ███   ███    ███ 
+███    █▀  ███       ███     ███   ███    ███   ███    ███   ███    █▀  
+███        ███       ███     ███   ███    ███  ▄███▄▄▄▄██▀   ███        
+███        ███       ███     ███ ▀███████████ ▀▀███▀▀▀▀▀   ▀███████████ 
+███    █▄  ███       ███     ███   ███    ███ ▀███████████          ███ 
+███    ███ ███▌    ▄ ███ ▄█▄ ███   ███    ███   ███    ███    ▄█    ███ 
+████████▀  █████▄▄██  ▀███▀███▀    ███    █▀    ███    ███  ▄████████▀  
+           ▀                                    ███    ███              
+")
+
+;; Actor in the game,
+;; eg the player, an npc, etc
+(defstruct *actor*
+  inventory ; Something representing goods held
+  health
+  mana)
+
+;; This represents the goods market
+;; as a whole
+(defstruct *market*)
+
+;; https://stackoverflow.com/questions/4882361/which-command-could-be-used-to-clear-screen-in-clisp
+(defun cls()
+  (format t "~A[H~@*~A[J" #\escape))
+
+(defun prompt-read (prompt)
+  (format *query-io* "~a" prompt)
+  (force-output *query-io*)
+  (read-line *query-io*))
+
+(defun main ()
+  (format t *menu-splash*)
+  (format t "Press any key to start")
+  (prompt-read "")
+  (cls))