For numbers specifically, sometimes they can be read as similar letters. They must be accounted for. We can annotate all number variations found:
```
0: O,o,e
1: \,/,I,i
2: 己
3:
4:
5:
6: b,G
7: z,Z
8:
9: g,y
```
sigonasr2
added this to the Arcade Parser milestone 3 years ago
Number alternatives are read in and then parses the number appropriately.
```java
char[][] number_alternatives={
/*0*/{'0','o','O','e'},
/*1*/{'1','\\','/','I','i'},
/*2*/{'2'},
/*3*/{'3'},
/*4*/{'4'},
/*5*/{'5'},
/*6*/{'6','b'},
/*7*/{'7'},
/*8*/{'8','B'},
/*9*/{'9','g','y',},
};
int convertToInt(String[]data){return convertToInt(" ",data);}
int convertToInt(String prefix,String[] data) {
int numb=0;
for (int i=0;i<data.length;i++) {
String s = data[i];
int j=0;
if (i==1) {
j=prefix.length()-1;
} else {
j=0;
}
for (;j<s.length();j++) {
letter_iterator:
for (int k=0;k<number_alternatives.length;k++) {
for (int l=0;l<number_alternatives[k].length;l++) {
if (s.charAt(j)==number_alternatives[k][l]) {
numb*=10;
numb+=k;
break letter_iterator;
}
}
}
}
}
return numb;
}
```
Number alternatives are read in and then parses the number appropriately.
For numbers specifically, sometimes they can be read as similar letters. They must be accounted for. We can annotate all number variations found:
Number alternatives are read in and then parses the number appropriately.