Package fr.formiko.formiko
Class GInsecte
java.lang.Object
fr.formiko.usual.structures.listes.Liste<Insecte>
fr.formiko.formiko.GInsecte
- All Implemented Interfaces:
Serializable
,Iterable<Insecte>
,Collection<Insecte>
,List<Insecte>
public class GInsecte
extends fr.formiko.usual.structures.listes.Liste<Insecte>
implements Serializable
List of Insecte.
- Author:
- Hydrolien
- See Also:
-
Field Summary
Fields inherited from class fr.formiko.usual.structures.listes.Liste
head, tail
-
Constructor Summary
-
Method Summary
Methods inherited from class fr.formiko.usual.structures.listes.Liste
add, add, add, addAll, addAll, addHead, addList, addSorted, addTail, clear, contains, containsAll, equals, filter, get, getFirst, getHead, getItem, getLast, getMost, getTail, indexOf, isEmpty, iterator, lastIndexOf, length, listIterator, listIterator, pop, push, push, remove, remove, removeAll, removeDuplicateItem, removeItem, retainAll, set, setHead, setTail, size, sort, subList, toArray, toArray, toGString, toString, toStringLong, updateTail
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
hashCode, replaceAll, spliterator
-
Constructor Details
-
GInsecte
public GInsecte()Main constructor with 0 Insect. -
GInsecte
public GInsecte(int nbrOfInsect) Secondary constructor with nbrOfInsect Insect.- Parameters:
nbrOfInsect
- the number of insect to add.
-
-
Method Details
-
getInsectePlusDeGivenFood
return the Insecte that can give the most food. -
add
public void add(int nbrOfInsect) add nbrOfInsect insect.- Parameters:
nbrOfInsect
- the number of insect to add.
-
add
public void add() -
tourInsecte
public void tourInsecte()Play turn of insects. -
preTurn
public void preTurn()Play pre-turn of insects. -
getGiVivant
retrun a new GInsecte with only alive insects. -
toGCreature
retrun this as a GCreature.
-