public class ZoneTerrain extends java.awt.Rectangle implements java.lang.Comparable, _Zone
Constructor and Description |
---|
ZoneTerrain()
Constructeur par défaut
|
ZoneTerrain(int typeZone)
Constructeur prennant un type de zone en argument
|
ZoneTerrain(int x,
int y,
int width,
int height)
Constructeur ZoneTerrain :
|
ZoneTerrain(int x,
int y,
int width,
int height,
int typeZone)
Constructeur ZoneTerrain :
|
Modifier and Type | Method and Description |
---|---|
ZoneTerrain |
addEmbut()
Créer un embut par réduction de 95% de la zone
|
java.awt.Point |
centreGavite()
Retourne le centre de gracité de la zone
|
int |
compareTo(java.lang.Object o) |
boolean |
contains(AbstractTortue t)
Vrai si la tortue se trouve dans la zone, Faux sinon
|
java.util.ArrayList<ZoneTerrain> |
divisionNbrZones(int n)
Diviser la zone en N zones
|
int |
getTypeZone()
Retourne le type de zone :
1=> equipe
0=> enbut
2=> limite
3=> sortie
|
ZoneTerrain |
reductionPct(float pct)
Retourne une ZoneTerrain réduction de pct pourcents de this
|
void |
setTypeZone(int typeZone)
Définie le type de zone :
|
double |
surface()
Retourne la surface de la zone
|
java.lang.String |
toString()
Méthode toString
|
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
public ZoneTerrain()
public ZoneTerrain(int typeZone)
typeZone
- public ZoneTerrain(int x, int y, int width, int height)
x
- X minimumy
- Y minimumwidth
- Largeur de la zoneheight
- Hauteur de la zoneRectangle.Rectangle(int, int, int, int)
public ZoneTerrain(int x, int y, int width, int height, int typeZone)
x
- X minimumy
- Y minimumwidth
- Largeur de la zoneheight
- Hauteur de la zonetypeZone
- type de la zoneRectangle.Rectangle(int, int, int, int)
public java.util.ArrayList<ZoneTerrain> divisionNbrZones(int n)
n
- public ZoneTerrain reductionPct(float pct)
pct
- public java.awt.Point centreGavite()
_Zone
centreGavite
in interface _Zone
public double surface()
_Zone
public boolean contains(AbstractTortue t)
_Zone
public int getTypeZone()
_Zone
getTypeZone
in interface _Zone
public void setTypeZone(int typeZone)
_Zone
setTypeZone
in interface _Zone
public java.lang.String toString()
_Zone
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public ZoneTerrain addEmbut()