public interface INavyFleet
Modifier and Type | Method and Description |
---|---|
int |
add(IShip IShip) |
default org.json.JSONArray |
asJSON()
donne une représentation de l'objet courant sous la forme d'un tableau JSON
|
java.util.List<IShip> |
getShips()
donne la liste triée de tous les bateaux de la flotte
|
java.util.Set<IShip> |
getShips(ShipCategory shipCategory)
donne l'ensemble de tous les bateaux d'une catégorie donnée
|
boolean |
isBelgianConfiguration()
indique si la flotte est dans la configuration "belge" :
1 cuirassé, 2 croiseurs, 3 torpilleurs, 4 sous-marins
|
boolean |
isComplete() |
boolean |
isFrenchConfiguration()
indique si la flotte est dans la configuration "française" :
1 porte-avion, 1 cuirassé, 2 croiseurs, 2 torpilleurs, 1 sous-marin
|
int |
remainingSize()
au départ la taille d'une flotte est de 20 ; plus elle contient de navires, plus sa taille restante diminue
|
java.lang.String |
toString() |
int add(IShip IShip)
IShip
- le bateau à ajouter à la flottedefault org.json.JSONArray asJSON()
java.util.List<IShip> getShips()
java.util.Set<IShip> getShips(ShipCategory shipCategory)
shipCategory
- la catégorie de bateaux à considérerboolean isBelgianConfiguration()
boolean isComplete()
boolean isFrenchConfiguration()
int remainingSize()
java.lang.String toString()
toString
in class java.lang.Object