Skip to content

Instantly share code, notes, and snippets.

@awb99
awb99 / crepl_tic-tac-toe.clj
Created October 4, 2019 23:20 — forked from thegeez/crepl_tic-tac-toe.clj
crepl Tic Tac Toe example with atom sync
(ns crepl.tic-tac-toe
(:require [reagent.core :as r]
crepl.atom-sync))
;; use this instead of reagent.core/atom to keep the state in sync
(def data (crepl.atom-sync/atom-sync {:turn :X}))
(def win-lines (-> #{}
(into (for [i (range 3)]
(for [j (range 3)]