Skip to content

Commit

Permalink
Merge pull request #200 from GravityProtogen/development
Browse files Browse the repository at this point in the history
Added Punctuation
  • Loading branch information
CrazyMarvin authored Oct 28, 2024
2 parents 4f6dfd9 + c282bfb commit d0b575b
Showing 1 changed file with 73 additions and 1 deletion.
74 changes: 73 additions & 1 deletion app/src/main/java/rocks/poopjournal/morse/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
}
Expand Down Expand Up @@ -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 "";
}

Expand Down

0 comments on commit d0b575b

Please sign in to comment.