src/caves/entities/aspects/digger.clj @ 811f328099c6

Real attacking, and some refactoring.
author Steve Losh <steve@stevelosh.com>
date Tue, 17 Jul 2012 23:22:14 -0400
parents 180b5b981d92
children 1a3a4f8d5d85
(ns caves.entities.aspects.digger
  (:use [caves.entities.core :only [defaspect]]
        [caves.world :only [check-tile set-tile-floor]]))


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