<commit_before>require "./character.rb"

# create a class for the story
class Story
	# define a prompt figure
	def prompt
		print ">"
	end

	# define player response
	def get_player_input
		gets.chomp()
	end

	def play_again?
		result = get_player_input
		result.downcase == "y"
	end

	# begin story 
	def begin!
		puts "[Insert creepy Goosebumps soundtrack]"
		puts "Ooooo-ahhhh-oooo"
		puts "This is the Goosebumps RPG: Say Cheese or Die."
		puts "You have an option of one of three characters:"
		
		puts ""
		puts ""
		
		puts "Good Guy Greg is unsurprisingly known as the good guy of the group."
		puts "He is generally a nice human being, is a casual badminton player, and likes yams."
		puts "His secret special power is the ability to do good."
		
		puts ""
		puts ""

		puts "<NAME>, on the other hand, is a character of dubious nature."
		puts "His name is apparently an homage to some baseball player he's got a signed bat from."
		puts "But some kiddies on the block say it's in reference to the bat and something much more sinister..."
		puts "His secret special power is the ability to swing his big bad bat."

		puts "" 
		puts ""

		puts "<NAME> is that one kid who is just a bit off. You know that one kid."
		puts "He's generally a light-hearted chump, but adds very little value to the group."
		puts "He has this nervous habit of eating food, which most often comes in the form of donuts."
		puts "Hence the nickname of course. And his special power is unsurprisingly..."
		puts "...the ability to eat donuts which result in some soothing or healing shit."

		puts ""
		puts ""

		puts "So that said, which character are you going to lead to his doom today?"

		puts "" 
		puts ""

		prompt
		response = get_player_input

		if response.capitalize == "Greg"
			@greg = GoodGuyGreg.new
			puts "Greg it is."

			puts ""
			puts "" 

			puts "So you're bored. Would you like to go do some exploring?"

			prompt
			respose = get_player_input

			if response.capitalize == "Yes"
				return :haunted_house
			else
				puts "You just dodged a major bullet. Congratulations, your life remains normal."
				Process.exit(1)
			end

		elsif response.capitalize == "Mickey"
			@mickey = MickeyTheStick.new
			puts "Mickey it is."
			return :haunted_house
			
		elsif response.capitalize == "Joey"
			@joey = JoeyBaggaDonuts.new
			puts "Joey it is."
			return :haunted_house
		else 
			puts "Please respond with either Greg, Mickey, or Joey."
		end
	end


	# create various story lines

	def haunted_house
		
		puts "Greg, Mickey, and Joey are quite bored on a Sunday morning as most puney teenagers are."
		puts "So of course, they decide to get up to no good."
		puts "They head into the house and mess about a la Clockwork Orange style."
		puts "(I know, a bit dark right?)"
		puts "So Greg in his infinite, albeit naive, wisdom comes across an old polaroid camera."
		puts "Greg points the camera at Mickey, who's leaning against a railing on the second floor."
		puts "As the picture begins to develop, the railing gives way and Mickey falls."
		puts "Boom - his ankle is broken."

		puts ""
		puts ""

		puts "They then hear creepy footsteps coming from above, so the kiddies decide that's a good time to make an exit, so they leave the house."
		puts "But the camera stays not within the confines of that haunted house, but rather within the clutches of Greg."

		puts "" <commit_msg>fixed player choice loop<commit_after>require "./character.rb"

# create a class for the story
class Story
	# define a prompt figure
	def prompt
		print ">"
	end

	# define player response
	def get_player_input
		gets.chomp()
	end

	def play_again?
		result = get_player_input
		result.downcase == "y"
	end

	# begin story 
	def begin!
		puts "[Insert creepy Goosebumps soundtrack]"
		puts "Ooooo-ahhhh-oooo"
		puts "This is the Goosebumps RPG: Say Cheese or Die."
		puts "You have an option of one of three characters:"
		
		puts ""
		puts ""
		
		puts "Good Gu<NAME> is unsurprisingly known as the good guy of the group."
		puts "He is generally a nice human being, is a casual badminton player, and likes yams."
		puts "His secret special power is the ability to do good."
		
		puts ""
		puts ""

		puts "<NAME>, on the other hand, is a character of dubious nature."
		puts "His name is apparently an homage to some baseball player he's got a signed bat from."
		puts "But some kiddies on the block say it's in reference to the bat and something much more sinister..."
		puts "His secret special power is the ability to swing his big bad bat."

		puts "" 
		puts ""

		puts "<NAME> is that one kid who is just a bit off. You know that one kid."
		puts "He's generally a light-hearted chump, but adds very little value to the group."
		puts "He has this nervous habit of eating food, which most often comes in the form of donuts."
		puts "Hence the nickname of course. And his special power is unsurprisingly..."
		puts "...the ability to eat donuts which result in some soothing or healing shit."

		puts ""
		puts ""

		puts "So that said, which character are you going to lead to his doom today?"

		puts "" 
		puts ""

		

		def player_choice

			prompt
			response = get_player_input
			
			if response.capitalize == "Greg"
				puts "Greg it is."

				puts ""
				puts "" 

				puts "So you're bored. Would you like to go do some exploring?"

				prompt
				response = get_player_input

				if response.capitalize == "Yes"
					return haunted_house
				elsif response.capitalize == "No"
					puts "You just dodged a major bullet. Congratulations, your life remains normal."
					Process.exit(1)
				else
					puts "Please respond with a yes or no."
				end

			elsif response.capitalize == "Mickey"
				puts "Mickey it is."
				return haunted_house
				
			elsif response.capitalize == "Joey"
				puts "Joey it is."
				return haunted_house
			else 
				puts "Please respond with either Greg, Mickey, or Joey."
				return player_choice
			end
		end
		player_choice
	end




	# create various story lines

	def haunted_house
		
		puts "Greg, Mickey, and Joey are quite bored on a Sunday morning as most puney teenagers are."
		puts "So of course, they decide to get up to no good."
		puts "They head into the house and mess about a la Clockwork Orange style."
		puts "(I know, a bit dark right?)"
		puts "So Greg in his infinite, albeit naive, wisdom comes across an old polaroid camera."
		puts "Greg points the camera at Mickey, who's leaning against a railing on the second floor."
		puts "As the picture begins to develop, the railing gives way and Mickey falls."
		puts "Boom - his ankle is broken."

		puts ""
		puts ""

		puts "They then hear creepy footsteps coming from above, so the kiddies decide that's a good time to make an exit, so they leave the house."
		puts "But the camera stays not within the confines of that haunted house, but rather within the clutches of Greg."

		puts "" 
{'fraction_non_alphanumeric': 0.06981460023174971, 'fraction_numerical': 0.00028968713789107763, 'mean_word_length': 3.0954922894424675, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '2168691', 'n_tokens_mistral': 2444, 'n_tokens_neox': 2027, 'n_words': 1023}