forked from menault/TD3_DEV51_Qualite_Algo
Add: Project-Pendu
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
|
||||||
|
public class Lettre{
|
||||||
|
private char lettre;
|
||||||
|
private boolean status = false;
|
||||||
|
|
||||||
|
public Lettre(char lettre){
|
||||||
|
this.lettre = lettre;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Status bool */
|
||||||
|
private boolean getStatus(){
|
||||||
|
return status
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean isGood(char c){
|
||||||
|
if( this.lettre == c){
|
||||||
|
this.status = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,22 @@
|
|||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Mot {
|
||||||
|
public String mot;
|
||||||
|
public Lettre[] chaine;
|
||||||
|
|
||||||
|
|
||||||
|
public Mot(String mot){
|
||||||
|
this.mot = mot;
|
||||||
|
for(int i = 0; i< this.mot.length();i++){
|
||||||
|
this.chaine[i] = Lettre(this.mot.charAt(i))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user