src/caves/entities/aspects/digger.clj @ 180b5b981d92

use the black magic everywhere
author Steve Losh <steve@stevelosh.com>
date Sat, 14 Jul 2012 14:32:49 -0400
parents 35acf92fe597
children 811f328099c6
(ns caves.entities.aspects.digger
  (:use [caves.entities.core :only [defaspect]]
        [caves.world :only [check-tile set-tile-floor]]))


(defaspect Digger
  (dig [this world dest]
    {:pre [(can-dig? this world dest)]}
    (set-tile-floor world dest))
  (can-dig? [this world dest]
    (check-tile world dest #{:wall})))