-
Notifications
You must be signed in to change notification settings - Fork 0
/
aiCreator.cs
63 lines (46 loc) · 1.26 KB
/
aiCreator.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class aiCreator : MonoBehaviour
{
static char[] pref = {'A','K','T','H','N','M','S'};
static char[] cons = {'b','c','f','h','k','m','n','r','s','t','v','w','y'};
static char[] vowels = {'a','i','o','u'};
public static string weebNameGenerator(){
System.Random r = new System.Random();
int length = r.Next(3,9);
if(length%2!=0){
length += 1;
}
string name="";
int st = r.Next(0,7);
name += pref[st];
int bf = 1;
if(pref[st] == 'S' || pref[st] == 'K'){
int dec = r.Next(0,8);
if(dec == 7){
name += 'h';
}
}
if(pref[st] != 'A'){
bf = 0;
}
for(int i=1-bf;i<length;i++){
if(i%2==0){
int indx = r.Next(0,13);
name += cons[indx];
if(cons[indx] == 's' || cons[indx] == 'k' || cons[indx] == 'c'){
int dec = r.Next(0,2);
if(dec == 1){
name += 'h';
}
}
}
else{
int indx = r.Next(0,4);
name += vowels[indx];
}
}
return name;
}
}