<commit_before>(ns battlebots.game.test-game
  (:require [battlebots.game.utils :as gu]))

(def o {:type "open"
        :display " "
        :transparent true})
(def b {:type "block"
        :display "X"
        :transparent false
        :energy 20})
(def f {:type "food"
        :display "+"
        :transparent true})
(def p {:type "poison"
        :display "-"
        :transparent true})
(def a {:type "ai"
        :display "@"
        :transparent true
        :energy 20})

(def bot1-private {:_id "1"
                   :type "player"
                   :uuid "1111-1111-1111-1111"
                   :login "oconn"
                   :bot-repo "bot"
                   :energy 20
                   :messages []
                   :bot "{:commands [{:cmd \"MOVE\"
                                      :metadata {:direction (rand-nth [0])}}
                                     {:cmd \"SET_STATE\"
                                      :metadata {:step-counter 0}}]}"
                   :saved-state {}})
(def bot2-private {:_id "2"
                   :type "player"
                   :uuid "2222-2222-2222-2222"
                   :login "Mr. Robot"
                   :bot-repo "bot"
                   :energy 50
                   :messages []
                   :bot "{:commands [{:cmd \"MOVE\"
                                      :metadata {:direction (rand-nth [0])}}
                                     {:cmd \"SET_STATE\"
                                      :metadata {:step-counter 0}}]}"
                   :saved-state {}})
(def b1 (gu/sanitize-player bot1-private))
(def b2 (gu/sanitize-player bot2-private))
(def test-players [bot1-private bot2-private])

;; NOTE: do NOT modify this arena. Almost all of game tests
;; rely on it and will most likey break all off them if it is modified.
;; If modification is required, re-run tests and make necessary changes.
(def test-arena [[o o b f p f f]
                 [b f f p o o o]
                 [b f o o p f p]
                 [b f f a o b b1]
                 [b p o o o p b2]
                 [p o p f f f f]
                 [o o o o f p f]])

(def test-game-state {:initial-arena test-arena
                      :clean-arena test-arena
                      :dirty-arena test-arena
                      :frames []
                      :segment-count 0
                      :_id "1"
                      :messages []
                      :players [bot1-private bot2-private]})<commit_msg>update test game<commit_after>(ns battlebots.game.test-game
  (:require [battlebots.game.utils :as gu]))

(def o {:type "open"
        :display " "
        :transparent true})
(def b {:type "block"
        :display "X"
        :transparent false
        :energy 20})
(def f {:type "food"
        :display "+"
        :transparent true})
(def p {:type "poison"
        :display "-"
        :transparent true})
(def a {:type "ai"
        :display "@"
        :transparent true
        :energy 20})

(def bot1-private {:_id "1"
                   :type "player"
                   :uuid "1111-1111-1111-1111"
                   :login "oconn"
                   :bot-repo "bot"
                   :energy 20
                   :bot "{:commands [{:cmd \"MOVE\"
                                      :metadata {:direction (rand-nth [0])}}
                                     {:cmd \"SET_STATE\"
                                      :metadata {:step-counter 0}}]}"
                   :saved-state {}})
(def bot2-private {:_id "2"
                   :type "player"
                   :uuid "2222-2222-2222-2222"
                   :login "Mr. Robot"
                   :bot-repo "bot"
                   :energy 50
                   :bot "{:commands [{:cmd \"MOVE\"
                                      :metadata {:direction (rand-nth [0])}}
                                     {:cmd \"SET_STATE\"
                                      :metadata {:step-counter 0}}]}"
                   :saved-state {}})
(def b1 (gu/sanitize-player bot1-private))
(def b2 (gu/sanitize-player bot2-private))
(def test-players [bot1-private bot2-private])

;; NOTE: do NOT modify this arena. Almost all of game tests
;; rely on it and will most likey break all off them if it is modified.
;; If modification is required, re-run tests and make necessary changes.
(def test-arena [[o o b f p f f]
                 [b f f p o o o]
                 [b f o o p f p]
                 [b f f a o b b1]
                 [b p o o o p b2]
                 [p o p f f f f]
                 [o o o o f p f]])

(def test-game-state {:initial-arena test-arena
                      :clean-arena test-arena
                      :dirty-arena test-arena
                      :frames []
                      :segment-count 0
                      :_id "1"
                      :messages {}
                      :players [bot1-private bot2-private]})
{'fraction_non_alphanumeric': 0.11976292662987942, 'fraction_numerical': 0.024524831391784182, 'mean_word_length': 1.1122140699179974, '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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5432342', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1340, 'n_words': 441}