     (update :player next-player)
     ))
 
+;; --------------------------------------------------------
+;; Game logic (public)
+;; --------------------------------------------------------
+
+(defn new-game
+  "Create a new fresh game, with empty board and no history"
+  []
+  [{:board empty-board :player :cell/cross}])
+
 (defn on-move
   "On reception of the move command"
   [game-state x y]

(def lines (concat rows cols diags))

;; --------------------------------------------------------
;; Game logic
;; --------------------------------------------------------

(defn new-game []
  [{:board empty-board :player :cell/cross}])

(defn- convert-cell
  "Convert the cell to the new player"
  [board player x y]
  (assoc board [x y] player))


(ns tictactoe.logic                                         ;; Game logic
  (:require
    [tictactoe.utils :as utils]
    ))

;; --------------------------------------------------------
;; Constants
