clwars.lisp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. (defvar *menu-splash* "
  2. ▄████████ ▄█ ▄█ █▄ ▄████████ ▄████████ ▄████████
  3. ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
  4. ███ █▀ ███ ███ ███ ███ ███ ███ ███ ███ █▀
  5. ███ ███ ███ ███ ███ ███ ▄███▄▄▄▄██▀ ███
  6. ███ ███ ███ ███ ▀███████████ ▀▀███▀▀▀▀▀ ▀███████████
  7. ███ █▄ ███ ███ ███ ███ ███ ▀███████████ ███
  8. ███ ███ ███▌ ▄ ███ ▄█▄ ███ ███ ███ ███ ███ ▄█ ███
  9. ████████▀ █████▄▄██ ▀███▀███▀ ███ █▀ ███ ███ ▄████████▀
  10. ▀ ███ ███
  11. ")
  12. ;; Actor in the game,
  13. ;; eg the player, an npc, etc
  14. (defstruct *actor*
  15. inventory ; Something representing goods held
  16. health
  17. mana)
  18. ;; This represents the goods market
  19. ;; as a whole
  20. (defstruct *market*)
  21. ;; https://stackoverflow.com/questions/4882361/which-command-could-be-used-to-clear-screen-in-clisp
  22. (defun cls()
  23. (format t "~A[H~@*~A[J" #\escape))
  24. (defun prompt-read (prompt)
  25. (format *query-io* "~a" prompt)
  26. (force-output *query-io*)
  27. (read-line *query-io*))
  28. (defun main ()
  29. (format t *menu-splash*)
  30. (format t "Press any key to start")
  31. (prompt-read "")
  32. (cls))