mirror of
https://github.com/lov3b/h_ng_dig.git
synced 2025-01-18 21:00:11 +01:00
Added userguess fail (partly)
This commit is contained in:
parent
ad958d406f
commit
75f08c40fb
@ -18,6 +18,10 @@ final int distansMellanrum = 20;
|
||||
final int distansTot = distansLangd+distansMellanrum;
|
||||
int state = startState;
|
||||
|
||||
// Användarfel
|
||||
boolean gissatRatt=false;
|
||||
int felGissningar = 0;
|
||||
|
||||
//Färger
|
||||
final color rod = color(255, 0, 0);
|
||||
final color gron = color(0, 255, 0);
|
||||
@ -146,9 +150,14 @@ void drawPlay() {
|
||||
if (secretWordArray[i].charAt(0) == anvandarVal && harBilvitTaget[i] == false) {
|
||||
println(i);
|
||||
harBilvitTaget[i] = true;
|
||||
gissatRatt=true;
|
||||
}
|
||||
}
|
||||
|
||||
if(gissatRatt == false){
|
||||
felGissningar +=1;
|
||||
}
|
||||
|
||||
// Stycket kod skriver ut de bokstäverna som användaren har gissat rätt i det hemliga ordet.
|
||||
int[] understrackKordinater = PositionOfLetter();
|
||||
for (int i=0; i < rVal.length(); i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user