text.clj

Bowmap · bowmap.git · Tickets

Branches > main > 66ff639 > files / src / net / bowmap / server / game / text.clj

(ns net.bowmap.server.game.text
  (:require
   [clojure.spec.alpha :as s]))

(s/def ::content string?)

(s/def ::color (s/and string? #(re-matches #"#[0-9a-fA-F]{6}" %)))
(s/def ::extra (s/coll-of ::text :kind sequential?))

(s/def ::text (s/keys :opt [::content ::color ::extra]))