Skip to content

Instantly share code, notes, and snippets.

@tvirolai
Created August 18, 2019 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvirolai/9626711be405f4ebbb7da284412667ae to your computer and use it in GitHub Desktop.
Save tvirolai/9626711be405f4ebbb7da284412667ae to your computer and use it in GitHub Desktop.
(defn square
[{:keys [clicked? ship?] :as p} enemy?]
(let [c (str "square"
(when (and ship? (or (false? enemy?) clicked?))
" has-background-primary"))]
[:div {:class c}]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment