03.08.2020
This commit is contained in:
parent
d0b89a4d86
commit
3c7a073220
|
@ -68,7 +68,7 @@ public class Main extends Application {
|
||||||
|
|
||||||
private static final int COUNT_LIMIT = 10;
|
private static final int COUNT_LIMIT = 10;
|
||||||
|
|
||||||
String wort;
|
private String wort;
|
||||||
String rightletterString;
|
String rightletterString;
|
||||||
|
|
||||||
char[] wortToArr;
|
char[] wortToArr;
|
||||||
|
@ -116,12 +116,15 @@ public class Main extends Application {
|
||||||
public boolean letterCheck(char[] wortToArr, char[] displayWord) {
|
public boolean letterCheck(char[] wortToArr, char[] displayWord) {
|
||||||
|
|
||||||
for (int i = 0; i < wort.length(); i++) {
|
for (int i = 0; i < wort.length(); i++) {
|
||||||
if (letter.getText().isEmpty() == false && wortToArr[i] == letter.getText().charAt(0)) {
|
if (letter.getText().isEmpty() == false) {
|
||||||
|
if(wortToArr[i] == letter.getText().toLowerCase().charAt(0) || wortToArr[i] == letter.getText().toUpperCase().charAt(0)) {
|
||||||
displayWord[i] = wortToArr[i];
|
displayWord[i] = wortToArr[i];
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user