<commit_before>require 'gtk3'

Dir[File.dirname(__FILE__) + '/*.rb'].each {|file| require file }
require_relative "../class/generator_class.rb"

class Game < Gtk::Overlay

  def initialize(window, board)
    super()

    @window = window

    hBox = Gtk::Box.new(:horizontal,2)
    @boardComponent = BoardComponent.create board, self
    inGameMedu = InGameMenu.create(@boardComponent)

    # create headerbar
    @header = HeadBar.create(self, "Sudoku","Groupe C",@boardComponent)
    window.titlebar = @header
    hBox.add(@boardComponent)
    hBox.add(inGameMedu)

    @backgroundColor = window.style_context.get_background_color "NORMAL"
    @backgroundColor_blur  = Gdk::RGBA.new(@backgroundColor.red, @backgroundColor.green, @backgroundColor.blue, 0.75)
    @cursorWait = Gdk::Cursor.new("wait")
    @cursorDefault = Gdk::Cursor.new("default")

    init_overlay

    self.add(hBox)
  end

  def end_game
    cleanOverlay
    @header.time.toggle
    victory_ovly = OverlayVictory.new(
      2, @header.time.elapse, @boardComponent.board.difficulty<commit_msg>accueil up and running on startup<commit_after>require 'gtk3'

Dir[File.dirname(__FILE__) + '/*.rb'].each {|file| require file }
require_relative "../class/generator_class.rb"

class Game < Gtk::Overlay

  def initialize(window, board)
    super()

    @window = window

    hBox = Gtk::Box.new(:horizontal,2)
    @boardComponent = BoardComponent.create board, self
    inGameMedu = InGameMenu.create(@boardComponent)

    # create headerbar
    @header = HeadBar.create(self, "Sudoku","Groupe C",@boardComponent)
    window.titlebar = @header
    hBox.add(@boardComponent)
    hBox.add(inGameMedu)

    @backgroundColor = window.style_context.get_background_color "NORMAL"
    @backgroundColor_blur  = Gdk::RGBA.new(@backgroundColor.red, @backgroundColor.green, @backgroundColor.blue, 0.75)
    @cursorWait = Gdk::Cursor.new("wait")
    @cursorDefault = Gdk::Cursor.new("default")

    init_overlay
    accueil = Accueil.new
    addToOverlay accueil
    showOverlay
    @header.time.raz
    @header.time.toggle

    accueil.signal_retour do
      @header.time.raz
      @header.time.toggle
      cleanOverlay
      hideOverlay
      @header.new_game
    end

    self.add(hBox)
  end

  def end_game
    cleanOverlay
    @header.time.toggle
    victory_ovly = OverlayVictory.new(
      2, @header.time.elapse, @boardComponent.board.difficulty
{'fraction_non_alphanumeric': 0.12089738263398421, 'fraction_numerical': 0.004985459077690071, 'mean_word_length': 3.7777777777777777, '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': '6567007', 'n_tokens_mistral': 806, 'n_tokens_neox': 788, 'n_words': 139}