public class Match extends java.lang.Thread implements _Model, Observable
Constructor and Description |
---|
Match()
Constructeur de Match
|
Match(int nbrEquipes,
int nbrJoueurs,
java.lang.String[] noms,
int[] colors) |
Modifier and Type | Method and Description |
---|---|
void |
addEquipes(Equipe new_object)
Add a Equipes object to the equipesVector List
|
void |
addObserver(Observer obs)
Enregistre un Observateur à l'instance Observable
|
void |
end()
Méthode permettant d'arrêter un match
|
Balle |
getBalle()
Get the value of balle
|
java.util.ArrayList |
getEquipes()
Get the List of Equipes objects held by equipesVector
|
int |
getSpeed() |
Terrain |
getTerrain()
Get the value of plateau
|
java.lang.String |
getTitle() |
java.util.ArrayList<Tortue> |
getTortues() |
void |
init()
Initialise le match
|
void |
notifyObserver()
Notifie les Observateurs
|
void |
removeEquipes(Equipe new_object)
Remove a Equipe object from equipes ArrayList
|
void |
removeObserver()
Réinitialise la liste des Observateurs
|
void |
run()
Fait Jouer les tortues tant que run est vrai et si pause et faux
|
void |
setSpeed(int speed) |
void |
setTitle(java.lang.String title) |
void |
setTortues(java.util.ArrayList<Tortue> tortues) |
void |
toggleRun()
Méthode permettznt d'alterner Pause
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public Match()
public Match(int nbrEquipes, int nbrJoueurs, java.lang.String[] noms, int[] colors)
public void run()
run
in interface java.lang.Runnable
run
in interface _Model
run
in class java.lang.Thread
Thread.run()
,
_Model.run()
public void init()
init
in interface _Model
_Model.init()
public void toggleRun()
pause
public void end()
end
in interface _Model
_Model.end()
,
run
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the title to setpublic Terrain getTerrain()
public Balle getBalle()
public java.util.ArrayList getEquipes()
public void addEquipes(Equipe new_object)
public void removeEquipes(Equipe new_object)
public java.util.ArrayList<Tortue> getTortues()
public void setTortues(java.util.ArrayList<Tortue> tortues)
tortues
- the tortues to setpublic int getSpeed()
public void setSpeed(int speed)
speed
- the speed to setpublic void notifyObserver()
Observable
notifyObserver
in interface Observable
vue
- public void removeObserver()
Observable
removeObserver
in interface Observable
public void addObserver(Observer obs)
Observable
addObserver
in interface Observable
obs
- Observer