# frozen_string_literal: true module Codebreakergem class Statistic attr_accessor :name, :difficulty, :attempts_total, :attempts_used, :hints_total, :hints_used def initialize(name:, difficulty:, attempts_total:, hints_total:) @name = name @difficulty = difficulty @attempts_total = attempts_total @attempts_used = attempts_total - difficulty.attempts @hints_total = hints_total @hints_used = hints_total - difficulty.hints end end end