src/clojurecraft/actions.clj @ 0551a05c0e1e

Remove debug prints.
author Steve Losh <steve@stevelosh.com>
date Thu, 21 Jul 2011 21:24:17 -0400
parents 0431d566789d
children c41de2845803
(ns clojurecraft.actions
  (:use [clojurecraft.util]))


(defn move [bot x-change y-change z-change]
  (let [player (:player bot)]
    (dosync
      (let [location (:loc @player)
            new-location (merge location
                                {:x (+ x-change (:x location))
                                 :y (+ y-change (:y location))
                                 :z (+ z-change (:z location))
                                 :stance (+ y-change (:stance location))})]
        (alter player merge {:loc new-location}))))
  bot)