Skip to content

Commit

Permalink
m˙ˍˆ˕‮‎˕‏‪̀‮‎̀‏‪˘‮‎˘‏‪ˊor˕̀˗˔́̀ˇé̀ˈ͛˖˔ˡ iˏ̉́͘˓ˑ̶t˕ˇ̀è˔ˊ˔̴ͭͅr˓ˌà̀ˇ̀…
Browse files Browse the repository at this point in the history
…ͭˎˋt˕̟˓̀́ˌͭiͭˈˈ˔̢ͭͭoˇ̇ͭ̉ˈ͝ˆnˢ̝ˆˆ˧̔ˇs˔ˑͭ˔˓̺ͭ
  • Loading branch information
GlennFolker committed Nov 2, 2020
1 parent caa16f5 commit 3f76657
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions src/namegen/NameGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,44 @@ public static synchronized void name(BufferedReader reader) throws IOException{
StringBuilder result = new StringBuilder();
int last, num = 0;

for(int i = 0; i < name.length(); i++){
last = num;
for(int iteration = 0; iteration < 3; iteration++){
for(int i = 0; i < name.length(); i++){
last = num;

int a = name.codePointAt((i - 1 + name.length()) % name.length());
int b = name.codePointAt((i + 1 + name.length()) % name.length());
int n = name.codePointAt(i);
int a = name.codePointAt((i - 1 + name.length()) % name.length());
int b = name.codePointAt((i + 1 + name.length()) % name.length());
int n = name.codePointAt(i);

num = (n << a >> b) ^ (n >> a << b);
num = (n << a >> b) ^ (n >> a << b);

for(int h = 0; h < 2; h++){
int f = name.codePointAt(Math.abs((num + name.length()) % name.length()));
for(int h = 0; h < 2; h++){
int f = name.codePointAt(Math.abs((num + name.length()) % name.length()));

if(num <= last){
num ^= f;
}else{
num >>= f;
if(num <= last){
num ^= f;
}else{
num >>= f;
}
}
}

int seed = 768 + (num % 111);
int seedB = 710 + (num % 19);
int seedC = num <= last ? seed : seedB;
int seed = 768 + (num % 111);
int seedB = 710 + (num % 19);
int seedC = num <= last ? seed : seedB;

char c = name.charAt(i);
char c = name.charAt(i);

result.append(Character.toString(c));
if(!Character.isWhitespace(c)){
result.append(Character.toString(seedC));
result.append(Character.toString(c));
if(!Character.isWhitespace(c)){
result.append(Character.toString(seedC));
}
}
}

int iterations = 3, freq = iterations * 2;
for(int iteration = 0; iteration < iterations; iteration++){
name = result.toString();
result.setLength(0);
}

int iterations = 3, freq = iterations * 2;
for(int iteration = 0; iteration < iterations; iteration++){
for(int i = 0; i < name.length(); i++){
char c = name.charAt(i);
result.append(Character.toString(c));
Expand All @@ -98,9 +100,12 @@ public static synchronized void name(BufferedReader reader) throws IOException{
result.append(a);
}
}

name = result.toString();
result.setLength(0);
}

boolean success = setClipboardString(result.toString());
boolean success = setClipboardString(name);
if(success){
Log.log(LogLevel.info, "Generated name has been copied to clipboard!");
}else{
Expand Down

0 comments on commit 3f76657

Please sign in to comment.