public Simon() { root = new Node(); Learn(morse: ".-", meaning: "a"); Learn(morse: "-...", meaning: "b"); Learn(morse: "-.-.", meaning: "c"); Learn(morse: "-..", meaning: "d"); Learn(morse: ".", meaning: "e"); Learn(morse: "..-.", meaning: "f"); Learn(morse: "--.", meaning: "g"); Learn(morse: "....", meaning: "h"); Learn(morse: "..", meaning: "i"); Learn(morse: ".---", meaning: "j"); Learn(morse: "-.-", meaning: "k"); Learn(morse: ".-..", meaning: "l"); Learn(morse: "--", meaning: "m"); Learn(morse: "-.", meaning: "n"); Learn(morse: "---", meaning: "o"); Learn(morse: ".--.", meaning: "p"); Learn(morse: "--.-", meaning: "q"); Learn(morse: ".-.", meaning: "r"); Learn(morse: "...", meaning: "s"); Learn(morse: "-", meaning: "t"); Learn(morse: "..-", meaning: "u"); Learn(morse: "...-", meaning: "v"); Learn(morse: ".--", meaning: "w"); Learn(morse: "-..-", meaning: "x"); Learn(morse: "-.--", meaning: "y"); Learn(morse: "--..", meaning: "z"); Learn(morse: ".----", meaning: "1"); Learn(morse: "..---", meaning: "2"); Learn(morse: "...--", meaning: "3"); Learn(morse: "....-", meaning: "4"); Learn(morse: ".....", meaning: "5"); Learn(morse: "-....", meaning: "6"); Learn(morse: "--...", meaning: "7"); Learn(morse: "---..", meaning: "8"); Learn(morse: "----.", meaning: "9"); Learn(morse: "-----", meaning: "0"); Learn(morse: ".-.-.-", meaning: "."); Learn(morse: "--..--", meaning: ","); Learn(morse: "..--..", meaning: "?"); Learn(morse: ".----.", meaning: "'"); Learn(morse: "-.-.--", meaning: "!"); Learn(morse: "-..-.", meaning: "/"); Learn(morse: "-.--.", meaning: "("); Learn(morse: "-.--.-", meaning: ")"); Learn(morse: ".-...", meaning: "&"); Learn(morse: "---...", meaning: ":"); Learn(morse: "-.-.-.", meaning: ";"); Learn(morse: "-...-", meaning: "="); Learn(morse: ".-.-.", meaning: "+"); Learn(morse: "..--.-", meaning: "_"); Learn(morse: ".-..-.", meaning: "'\""); Learn(morse: "...-..-", meaning: "$"); Learn(morse: ".--.-.", meaning: "@"); morseByMeaning = root.GeneratePermutations(); }
public Node AddDit() { if (Dit == null) { Dit = new Node() { DitChildOf = this }; } return Dit; }
public Node AddDah() { if (Dah == null) { Dah = new Node() { DahChildOf = this }; } return Dah; }