<commit_before>package org.jousse
package bot

import controllers.routes
import play.api.libs.json._
import system.Replay

object JsonFormat {

  def apply(i: system.PlayerInput, domain: String): JsObject = Json.obj(
    "game" -> apply(i.game),
    "hero" -> i.hero.map(apply),
    "token" -> i.token,
    "playUrl" -> ("http://" + domain + routes.Api.move(i.game.id, i.token).url)
  )

  def apply(g: Game): JsObject = Json.obj(
    "id" -> g.id,
    "turn" -> g.turn,
    "maxTurns" -> g.config.maxTurns,<commit_msg>give the bots the view URL<commit_after>package org.jousse
package bot

import controllers.routes
import play.api.libs.json._
import system.Replay

object JsonFormat {

  def apply(i: system.PlayerInput, domain: String): JsObject = Json.obj(
    "game" -> apply(i.game),
    "hero" -> i.hero.map(apply),
    "token" -> i.token,
    "viewUrl" -> ("http://" + domain + routes.Application.visualization(i.game.id).url),
    "playUrl" -> ("http://" + domain + routes.Api.move(i.game.id, i.token).url)
  )

  def apply(g: Game): JsObject = Json.obj(
    "id" -> g.id,
    "turn" -> g.turn,
    "maxTurns" -> g.config.maxTurns,
{'fraction_non_alphanumeric': 0.18157894736842106, 'fraction_numerical': 0.0, 'mean_word_length': 3.1794871794871793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '6677069', 'n_tokens_mistral': 432, 'n_tokens_neox': 421, 'n_words': 90}