class

CryptogramSolver

Inherits Reference < Object

Constructors

new(file_path)
Source

Instance methods

build_indices
Source
find_candidate_word_matches(encrypted_word, letter_mapping : Hash(Char, Char)) : Set(String)
Source
find_candidate_word_matches(encrypted_word, letter_mapping : Hash(UInt8, UInt8)) : Set(String)
Source
find_words_by_letter_and_position(letter, letter_index_position)
Source
find_words_by_pattern(word_pattern)
Source
guess(letter_mapping, reverse_letter_mapping, encrypted_words) : Array(Hash(UInt8, UInt8))
Source
solve(phrase)
Source
try_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

Source
word_pattern(word)
Source