Class NetoyerFourmi

java.lang.Object
fr.formiko.formiko.interfaces.NetoyerFourmi
All Implemented Interfaces:
Netoyer, Serializable

public class NetoyerFourmi extends Object implements Serializable, Netoyer
Ant implementation.
Allow an ant to clean itself or an other Creature
Author:
Hydrolien
See Also:
  • Field Details

  • Constructor Details

    • NetoyerFourmi

      public NetoyerFourmi()
  • Method Details

    • netoyerIa

      public boolean netoyerIa(Creature c)
      An AI ant want to clean.
      Specified by:
      netoyerIa in interface Netoyer
      Parameters:
      c - The cleaning ant.
      Returns:
      true only if ant realy clean someone.
    • netoyer

      public void netoyer(Creature c)
      A non-AI ant want to clean.
      Specified by:
      netoyer in interface Netoyer
      Parameters:
      c - The cleaning ant.
    • netoyer

      public void netoyer(Creature c, Creature c2)
      An ant clean a Creature.
      Specified by:
      netoyer in interface Netoyer
      Parameters:
      c - The cleaning ant.
      c2 - The cleaned ant.
    • getNombreDeCreatureANetoyer

      public int getNombreDeCreatureANetoyer(Creature c)
      get number of non-100% clean ant.
      Specified by:
      getNombreDeCreatureANetoyer in interface Netoyer
      Parameters:
      c - The cleaning ant.
      Returns:
      the number of non-100% clean ant.
    • netoyerChoix

      private boolean netoyerChoix()
      Let a player choose the ant that he want to clean.
      Returns:
      true if the player chose an ant to clean.
    • netoyerPrivate

      private void netoyerPrivate()
      do the real cleaning action between cible ant net.
    • getFourmiParOrdreDeSaletéSurLaCase

      private int[] getFourmiParOrdreDeSaletéSurLaCase()
      get non-100% clean ant sort by cleaning level.
      Returns:
      the non-100% clean ant sort by cleaning level on the same Case.
    • getFourmiPasPropre

      private int[] getFourmiPasPropre()
      get non-100% clean ant.
      Returns:
      the non-100% clean ant.