Skip to content

Commit

Permalink
Get a screen up.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjl committed Aug 4, 2012
1 parent 00d5343 commit 0c20fc0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
11 changes: 6 additions & 5 deletions project.clj
@@ -1,6 +1,7 @@
(defproject ruin "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]])
:description ""
:url ""
:license {:name "MIT/X11"}
:main ^{:skip-aot true} ruin.core
:dependencies [[org.clojure/clojure "1.4.0"]
[clojure-lanterna "0.9.2"]])
36 changes: 31 additions & 5 deletions src/ruin/core.clj
@@ -1,6 +1,32 @@
(ns ruin.core)
(ns ruin.core
(:require [lanterna.screen :as s]))


(defonce game (ref nil))


(defn create-fresh-game []
(dosync
(ref-set game {})
(let [scr (s/get-screen)]
(alter game assoc :screen scr)
(s/start scr))))


(defn run-game []
(s/stop (:screen @game)))

(defn main []
(create-fresh-game)
(run-game))

(defn -main [& args]
(main))


(comment

(main)

)

(defn -main
"I don't do a whole lot."
[& args]
(println "Hello, World!"))

0 comments on commit 0c20fc0

Please sign in to comment.