Package fr.formiko.formiko
Class GIEspece
java.lang.Object
fr.formiko.usual.structures.listes.Liste<IEspece>
fr.formiko.formiko.GIEspece
- All Implemented Interfaces:
Serializable
,Iterable<IEspece>
,Collection<IEspece>
,List<IEspece>
public class GIEspece
extends fr.formiko.usual.structures.listes.Liste<IEspece>
implements Serializable
List of IEspece.
- Author:
- Hydrolien
- See Also:
-
Field Summary
Fields inherited from class fr.formiko.usual.structures.listes.Liste
head, tail
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate IEspece
createIEspece
(String s, String[] tdefault) Load a IEspece from game data.getIEspeceById
(int id) Return a species.private int
getIEspeceParAllea
(int a, int typeOfCase) Return a random insect species id from a random number.byte
getRandomTypeInsectOnTheCase
(int typeOfCase) Return a random insect species id.private int
getTotal
(int typeOfCase) get total score for a typeOfCase.private void
Load all IEspece from game data.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
-
GIEspece
public GIEspece()Create a new list of species from game data.
-
-
Method Details
-
getIEspeceById
Return a species.- Parameters:
id
- id of the species
-
getRandomTypeInsectOnTheCase
public byte getRandomTypeInsectOnTheCase(int typeOfCase) Return a random insect species id.- Parameters:
typeOfCase
- id of the Case
-
getTotal
private int getTotal(int typeOfCase) get total score for a typeOfCase.- Parameters:
typeOfCase
- id of the Case
-
getIEspeceParAllea
private int getIEspeceParAllea(int a, int typeOfCase) Return a random insect species id from a random number.- Parameters:
a
- random that have been chossentypeOfCase
- id of the Case
-
loadIEspeces
private void loadIEspeces()Load all IEspece from game data. -
createIEspece
Load a IEspece from game data.
Empty cells will be fullfill by default value.- Parameters:
s
- line to use to get sepcies data.tdefault
- default sepcies data.- Returns:
- the created IEspece
-