Commit b62f0cee authored by Cory Chamblin's avatar Cory Chamblin

Part 1

parents
*.fasl
*.dx32fsl
*.dx64fsl
*.lx32fsl
*.lx64fsl
*.x86f
*~
.#*
\ No newline at end of file
# A Roguelike in Common Lisp
This is the code for the [A Roguelike in Common Lisp](https://chamblin.net/tag/roguelike/) series.
## Usage
Assuming that `~/quicklisp/local-projects` is in your ASDF search path.
```
cd ~/quicklisp/local-projects/
git clone git@gitlab.com:cory/cl-rogue.git
cd cl-rogue
git checkout part-01
sbcl --eval "(asdf:load-system :cl-rogue)" --eval "(cl-rogue:main)"
```
Each part of the series has a unique branch (e.g. `part-02`) so you can see exactly how I leave the code at the end of each section.
## Author
* Cory Chamblin (c@chambl.in)
## Copyright
Copyright (c) 2018 Cory Chamblin (c@chambl.in)
## License
Licensed under the BSD License.
#|
This file is a part of cl-rogue project.
Copyright (c) 2018 Cory Chamblin (c@chambl.in)
|#
(defsystem "cl-rogue-test"
:defsystem-depends-on ("prove-asdf")
:author "Cory Chamblin"
:license "BSD"
:depends-on ("cl-rogue"
"prove")
:components ((:module "tests"
:components
((:test-file "cl-rogue"))))
:description "Test system for cl-rogue"
:perform (test-op (op c) (symbol-call :prove-asdf :run-test-system c)))
#|
This file is a part of cl-rogue project.
Copyright (c) 2018 Cory Chamblin (c@chambl.in)
|#
#|
Author: Cory Chamblin (c@chambl.in)
|#
(defsystem "cl-rogue"
:version "0.1.0"
:author "Cory Chamblin"
:license "BSD"
:depends-on ("cl-charms")
:components ((:module "src"
:components
((:file "cl-rogue"))))
:description ""
:long-description
#.(read-file-string
(subpathname *load-pathname* "README.markdown"))
:in-order-to ((test-op (test-op "cl-rogue-test"))))
(defpackage cl-rogue
(:use :cl)
(:export #:main))
(in-package :cl-rogue)
(defun render (window)
(charms:clear-window window)
(charms:write-string-at-point window "CL-Rogue!" 0 0)
(charms:write-string-at-point window "press q to quit" 0 1))
(defun main ()
(charms:with-curses ()
(charms:disable-echoing)
(charms:enable-raw-input :interpret-control-characters t)
(let ((window charms:*standard-window*))
(loop named :driver-loop
do (progn
(render window)
(when (char= #\q (charms:get-char window :ignore-error t))
(return-from :driver-loop)))))))
(defpackage cl-rogue-test
(:use :cl
:cl-rogue
:prove))
(in-package :cl-rogue-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-rogue)' in your Lisp.
(plan nil)
;; blah blah blah.
(finalize)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment