<commit_before>require_relative "fivedice.rb"
class ScoreSheet # Class for Score Sheet
	@@upper_scores = :ones, :twos, :threes, :fours, :fives, :sixes
	@@lower_scores = :full_house, :small_straight, :large_straight, :three_of_a_kind, :four_of_a_kind, :yahtzee, :chance
	attr_reader :sheet # Hash table of two element arrays where the first value is the score and the second is whether the field has been played
	attr_reader :filled # true if the score sheet is completely filled and no legal moves remain
	def initialize
		@filled, @sheet = false, Hash.new
		Array.new(@@upper_scores).concat(@@lower_scores).each {|s| @sheet[s] = [0, false]}
	end
	@@bonuses_and_totals = {upper_score_bonus: 0, upper_score_total: 0, lower_score_total: 0, total: 0}
=begin
	Enter a score
	Arguments: dice is an instance of the FiveDice class
			   field is a score field on the yahtzee score sheet
=end
	def enter_score(dice, field)
		@sheet[field] = send field, dice.dice.num
=begin
		need to do: calculate bonuses and totals
		need to do: test if @scores is filled. If true -> set @filled to true
=end
	end
=begin
	***Methods for calculating score***
	The methods take an array of five ints as an argument
=end

	def ones(dice); 	single_face 1	;end
	def twos(dice);		single_face 2	;end
	def threes(dice);	single_face 3	;end
	def fours(dice); 	single_face 4	;end<commit_msg>Update score_sheet.rb<commit_after>require_relative "fivedice.rb"
class ScoreSheet # Class for Score Sheet
	@@upper_scores = :ones, :twos, :threes, :fours, :fives, :sixes
	@@lower_scores = :full_house, :small_straight, :large_straight, :three_of_a_kind, :four_of_a_kind, :yahtzee, :chance
	attr_reader :sheet # Hash table of two element arrays where the first value is the score and the second is whether the field has been played
	attr_reader :filled # true if the score sheet is completely filled and no legal moves remain
	def initialize
		@filled, @sheet = false, Hash.new
		Array.new(@@upper_scores).concat(@@lower_scores).each {|s| @sheet[s] = [0, false]}
	end
	@@bonuses_and_totals = {upper_score_bonus: 0, upper_score_total: 0, lower_score_total: 0, total: 0}
=begin
	Enter a score
	Arguments: dice is an instance of the FiveDice class
			   field is a score field on the yahtzee score sheet
=end
	def enter_score(dice, field)
		@sheet[field] = send field, dice.dice.num
=begin
		need to do: calculate bonuses and totals
		need to do: test if @sheet is filled. If true -> set @filled to true
=end
	end
=begin
	***Methods for calculating score***
	The methods take an array of five ints as an argument
=end

	def ones(dice); 	single_face 1	;end
	def twos(dice);		single_face 2	;end
	def threes(dice);	single_face 3	;end
	def fours(dice); 	single_face 4	;end
{'fraction_non_alphanumeric': 0.09371554575523705, 'fraction_numerical': 0.006615214994487321, 'mean_word_length': 4.853763440860215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5678680', 'n_tokens_mistral': 979, 'n_tokens_neox': 929, 'n_words': 352}