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

    Constructors
    Constructor
    Description
    Main constructor with 0 Insect.
    GInsecte(int nbrOfInsect)
    Secondary constructor with nbrOfInsect Insect.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add()
     
    void
    add(int nbrOfInsect)
    add nbrOfInsect insect.
    retrun a new GInsecte with only alive insects.
    return the Insecte that can give the most food.
    void
    Play pre-turn of insects.
    retrun this as a GCreature.
    void
    Play turn of insects.

    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.lang.Iterable

    forEach

    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

      public Insecte 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

      public GInsecte getGiVivant()
      retrun a new GInsecte with only alive insects.
    • toGCreature

      public GCreature toGCreature()
      retrun this as a GCreature.