<commit_before>require_relative '../services/create_game'
class GamesController < ApplicationController

  def new; end

  def show
    @game = Game.find(params[:id])
  end

  def index; end

  def create
    game = CreateGame.new.call(params[:player_number].to_i)
    redirect_to game
  end
end<commit_msg>Create a GameState when showing a game<commit_after>require_relative '../services/create_game'
require_relative '../services/create_game_state'

class GamesController < ApplicationController

  def new; end

  def show
    @game = Game.find(params[:id])
    @game_state = CreateGameState.new.call(@game)
  end

  def index; end

  def create
    game = CreateGame.new.call(params[:player_number].to_i)
    redirect_to game
  end
end
{'fraction_non_alphanumeric': 0.09607577807848444, 'fraction_numerical': 0.0, 'mean_word_length': 4.034013605442177, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7040078', 'n_tokens_mistral': 233, 'n_tokens_neox': 224, 'n_words': 57}