<commit_before>(ns tictactoe.board
  (:require
    [tictactoe.cell :as cell]
    [tictactoe.logic :as logic]
    ))


(defn render-board-cell
  "Render a cell on the board"
  [board x y on-move]
  (cell/render-cell
    (get board [x y]) x y
    {:on-click #(on-move x y)}))

(defn render-board
  "Render the board: pure component that only depends on inputs"
  [board on-move]
  (into
    [:svg.board
     {:view-box (str "0 0 " logic/board-size " " logic/board-size)
      :style {:max-height "500px"}}]
    (for [[x y] logic/coordinates]
      [render-board-cell board x y])
    ))<commit_msg>bug: missing argument to the render-cell<commit_after>(ns tictactoe.board
  (:require
    [tictactoe.cell :as cell]
    [tictactoe.logic :as logic]
    ))


(defn render-board-cell
  "Render a cell on the board"
  [board x y on-move]
  (cell/render-cell
    (get board [x y]) x y
    {:on-click #(on-move x y)}))

(defn render-board
  "Render the board: pure component that only depends on inputs"
  [board on-move]
  (into
    [:svg.board
     {:view-box (str "0 0 " logic/board-size " " logic/board-size)
      :style {:max-height "500px"}}]
    (for [[x y] logic/coordinates]
      [render-board-cell board x y on-move])
    ))
{'fraction_non_alphanumeric': 0.14775510204081632, 'fraction_numerical': 0.00816326530612245, 'mean_word_length': 2.7956656346749225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3719249', 'n_tokens_mistral': 472, 'n_tokens_neox': 455, 'n_words': 136}