(ns buddho.dhamma.world.block
  (:require [buddho.core.dhamma :as d]
            [buddho.core.meta :as meta]
            [buddho.dhamma.graphics :as gr]
            [buddho.dhamma.state :as st]
            [buddho.core.state :refer [value]])
  (:require-macros [buddho.macros.dhamma :refer [defdhamma defconstructor]]))

(defdhamma create-block
  "tmp"
  {:data [x y sprite-url]}
  (let [sprite (-> (gr/create-sprite!)
                   (d/occur! dhamma)
                   d/return-value)
        idea (-> (st/have-idea! :fields [:sprite]
                                :data {:sprite sprite})
                 d/occur!)]
        idea
    ))
