|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJeu
La classe Jeu initialise un jeu (un ensemble) de questions/réponses et permet de tirer aléatoirement des questions.
Field Summary | |
private static Random |
aleas
Un générateur de nombres aléatoires. |
private int |
nombrePosees
Le nombre de questions déjà posées. |
private boolean[] |
posees
Détermine pour chaque question si elle a été posée ou non. |
private Question[] |
questions
L'ensemble des questions du jeu. |
Constructor Summary | |
Jeu()
Construit un nouveau jeu. |
Method Summary | |
boolean |
estVide()
Détermine si toutes les questions ont été posées ou non. |
int |
nombreTotalQuestions()
Retourne le nombre total de questions. |
Question |
tireQuestion()
Retourne une question choisie aléatoirement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Random aleas
private Question[] questions
private boolean[] posees
private int nombrePosees
Constructor Detail |
public Jeu()
Method Detail |
public Question tireQuestion()
public boolean estVide()
true
si et seulement si toutes les questions
présentes au lancement du Jeu ont été posées.public int nombreTotalQuestions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |