1. Steve Losh
  2. clojurecraft

Commits

Steve Losh  committed 99a4600

Update to Clojure 1.3. You'll need to lein clean; lein deps.

That was only moderately painful. I expected worse.

  • Participants
  • Parent commits f8ba5ff
  • Branches default

Comments (0)

Files changed (5)

File project.clj

View file
 (defproject clojurecraft "0.0.1-SNAPSHOT"
-  :description "TODO: add summary of your project"
-  :dependencies [[clojure "1.2.0"]
-                 [clojure-contrib "1.2.0"]]
+  :description "A framework for writing Minecraft bots in Clojure."
+  :dependencies [[clojure "1.3.0"]
+                 [org.clojure/math.combinatorics "0.0.2"]
+                 [org.clojure/math.numeric-tower "0.0.1"]]
   :jvm-opts ["-Xmx1g"])

File src/clojurecraft/core.clj

View file
   (:use [clojurecraft.in])
   (:use [clojurecraft.out])
   (:use [clojurecraft.util])
-  (:use [clojure.contrib.pprint :only (pprint)])
+  (:use [clojure.pprint :only (pprint)])
   (:require [clojurecraft.chunks :as chunks])
   (:require [clojurecraft.physics :as physics])
   (:require [clojurecraft.actions :as actions])
 (def STARTING-LOC (Location. 0 0 0 0 0 0 false))
 
 ; Worlds ---------------------------------------------------------------------------
-(def *worlds* (ref {}))
+(def ^:dynamic *worlds* (ref {}))
 (defn get-world [server]
   (dosync
     (ensure *worlds*)

File src/clojurecraft/physics.clj

View file
 (ns clojurecraft.physics
   (:use [clojurecraft.mappings])
   (:use [clojurecraft.util])
-  (:use [clojure.contrib.combinatorics :only (cartesian-product)])
+  (:use [clojure.math.combinatorics :only (cartesian-product)])
   (:require [clojurecraft.chunks :as chunks]))
 
 ; TODO: Investigate these.  I'm not convinced.

File src/examples/followbot.clj

View file
 (ns examples.followbot
-  (:use [clojure.contrib.math :only (abs)])
+  (:use [clojure.math.numeric-tower :only (abs)])
   (:require [clojurecraft.core :as core])
   (:require [clojurecraft.events :as events])
   (:require [clojurecraft.loops :as loops])

File src/examples/givebot.clj

View file
 (ns examples.givebot
-  (:require [clojure.contrib.string :as s])
+  (:require [clojure.string :as s])
   (:require [clojurecraft.core :as core])
   (:require [clojurecraft.events :as events])
   (:require [clojurecraft.actions :as actions]))