I have been trying to decode a program that was made but i'm having a hard time understanding what this part of the code does can anyone tell me what each variable does?
i think its for the checking part of the game but i'm unsure what chin and chin2 does as well as int t,x,a specifically
i'm sorry that the part i don't understand is quite long and thank you for your help in advance
int chin[] = new int[6];
int chin2[] = new int[6];
char bin[] = new char[6];
bin[0] = 'Q'; bin[1] = 'W'; bin[2] = 'E'; bin[3] = 'R'; bin[4] = 'T'; bin[5] = 'Y';
char a[] = new char[4];
int t[] = new int[4];
for (int x = 0;x<4;x++){
a[x] = (f.charAt(x));
}
for (int i = 0; i< 4;i++){
for (int tim = 0; tim<6;tim++){
if (a[i] == bin[tim]){
t[i] = tim +1;
}}
}for (int x = 0;x<4;x++){
if (t[x] == 1){
chin[0] = chin[0]+1;
} else if (t[x] == 2){
chin[1] = chin[1]+1;
} else if (t[x] == 3){
chin[2] = chin[2]+1;
} else if (t[x] == 4){
chin[3] = chin[3]+1;
} else if (t[x] == 5){
chin[4] = chin[4]+1;
} else if (t[x] == 6){
chin[5] = chin[5]+1;
}
if (d[x] == 1){
chin2[0] = chin2[0]+1;
} else if (d[x] == 2){
chin2[1] = chin2[1]+1;
} else if (d[x] == 3){
chin2[2] = chin2[2]+1;
} else if (d[x] == 4){
chin2[3] = chin2[3]+1;
} else if (d[x] == 5){
chin2[4] = chin2[4]+1;
} else if (d[x] == 6){
chin2[5] = chin2[5]+1;
}
}
for (int x = 0; x <= 3; x++) {
if (d[x] == t[x]) {
v++;
}
}
for (int x = 0;x<6;x++){
if (chin[x] <= chin2[x]){
count2 = count2 + chin[x];
} else {
count2 = count2 + chin2[x]; }
} count2 = count2 - v;
}