class Scrambler {
	def scramble(word) {
		Random rand = new Random()
		def result = (word.length()..1).inject(["", word]) { carry, index ->
			def randomNumber = rand.nextInt(index)
			def buildString = carry[0]
			def stripString = carry[1]
			def letter = stripString[randomNumber]
		  [buildString << letter, stripString - letter]
		}
		result[0]
	}
	
	def score(scrambled, guess) {
		13
	}
}
