diff --git a/app/src/main/java/rocks/poopjournal/morse/MainActivity.java b/app/src/main/java/rocks/poopjournal/morse/MainActivity.java index d0cbfbb..3aa67ba 100644 --- a/app/src/main/java/rocks/poopjournal/morse/MainActivity.java +++ b/app/src/main/java/rocks/poopjournal/morse/MainActivity.java @@ -333,6 +333,42 @@ static String morseEncode(String x) { return ".-.-"; case "ñ": return "--.--"; + case ",": + return "--..--"; + case ".": + return ".-.-.-"; + case "?": + return "..--.."; + case "'": + return ".----."; + case "!": + return "-.-.--"; + case "/": + return "-..-."; + case "(": + return "-.--."; + case ")": + return "-.--.-"; + case "&": + return ".-..."; + case ":": + return "---..."; + case ";": + return "-.-.-."; + case "=": + return "-...-"; + case "+": + return ".-.-."; + case "-": + return "-....-"; + case "_": + return "..--.-"; + case '"': + return ".-..-."; + case "$": + return "...-..-"; + case "@": + return ".--.-."; default: return ""; } @@ -420,8 +456,44 @@ static String morseDecode(String morse) { return "9"; case "--.--": return "ñ"; + case "--..--": + return ","; + case ".-.-.-": + return "."; + case "..--..": + return "?"; + case ".----.": + return "'"; + case "-.-.--": + return "!"; + case "-..-.": + return "/"; + case "-.--.": + return "("; + case "-.--.-": + return ")"; + case ".-...": + return "&"; + case "---...": + return ":"; + case "-.-.-.": + return ";"; + case "-...-": + return "="; + case ".-.-.": + return "+"; + case "-....-": + return "-"; + case "..--.-": + return "_"; + case ".-..-.": + return '"'; + case "...-..-": + return "$"; + case ".--.-.": + return "@"; } - + return ""; }