CryptogramSolver
Inherits Reference < Object
Constructors
new(file_path)
SourceInstance methods
build_indices
Sourcefind_candidate_word_matches(encrypted_word, letter_mapping : Hash(Char, Char)) : Set(String)
Sourcefind_candidate_word_matches(encrypted_word, letter_mapping : Hash(UInt8, UInt8)) : Set(String)
Sourcefind_words_by_letter_and_position(letter, letter_index_position)
Sourcefind_words_by_pattern(word_pattern)
Sourceguess(letter_mapping, reverse_letter_mapping, encrypted_words) : Array(Hash(UInt8, UInt8))
Sourcesolve(phrase)
Sourcetry_extend_mapping(word, encrypted_word, letter_mapping, reverse_letter_mapping) : Tuple(Hash(UInt8, UInt8), Hash(UInt8, UInt8)) | Nil
if word is a possible match for the encrypted_word, given the existing letter_mapping, then this function returns the combined letter mappings of the word-specific letter mappings and the existing letter mappings; nil otherwise Assumes word.size == encrypted_word.size
word_pattern(word)
Source