finish up and close #482

This commit is contained in:
Bella 2020-04-05 19:43:41 -04:00
parent 74bf828a85
commit d06a9aeac6
No known key found for this signature in database
GPG Key ID: 815562EA23BFE344
1 changed files with 11 additions and 9 deletions

View File

@ -29,7 +29,7 @@ public class FancyChat extends Module {
private String getText(Mode t, String s) {
switch (t) {
case UWU:
return "Error: UWU mode is still experimental";
return uwuConverter(s);
case LEET:
return leetConverter(s);
case MOCKING:
@ -41,14 +41,6 @@ public class FancyChat extends Module {
}
}
// rules:
// ove > uv
// l > w
//
// private String uwuifier(String input) {
// input.replace("a", "b");
// }
private String leetConverter(String input) {
StringBuilder message = new StringBuilder();
for (int i = 0 ; i < input.length() ; i++) {
@ -75,6 +67,16 @@ public class FancyChat extends Module {
return message.toString();
}
private String uwuConverter(String input) {
input = input.replace("ove", "uv");
input = input.replace("the", "da");
input = input.replace("is", "ish");
input = input.replace("r", "w");
input = input.replace("ve", "v");
input = input.replace("l", "w");
return input;
}
private String greenConverter(String input) {
return "> " + input;
}