Class TourFourmiNonIa

java.lang.Object
fr.formiko.formiko.interfaces.TourFourmi
fr.formiko.formiko.interfaces.TourFourmiNonIa
All Implemented Interfaces:
Tour, Serializable

public class TourFourmiNonIa extends TourFourmi implements Serializable, Tour
Ant implementation for real player.
Allow an ant to play a turn
Author:
Hydrolien
See Also:
  • Constructor Details

    • TourFourmiNonIa

      public TourFourmiNonIa()
  • Method Details

    • tour

      public void tour()
      Do turn actions for an ant. There is no order to do actions because player choose it.
      Overrides:
      tour in class TourFourmi
    • endTurn

      public void endTurn(Creature c)
      Description copied from class: TourFourmi
      End a turn as an Ant.
      If turn have already be end on this turn, it will do nothing.
      Specified by:
      endTurn in interface Tour
      Overrides:
      endTurn in class TourFourmi
      Parameters:
      c - The Creature that need to end a turn.
    • allowToDisableAutoMode

      public void allowToDisableAutoMode()
      Do turn actions that can be done without action. There is no order to do actions because player choose it.
    • getChoixBouton

      public byte getChoixBouton(boolean evenIfNoAction)
      Return user choice to do an ant action. There is no order to do actions because player choose it.
      Parameters:
      evenIfNoAction - Don't return -1 just because ant have no action to do
    • getChoixBouton

      public byte getChoixBouton()
      Return user choice to do an ant action. There is no order to do actions because player choose it.
    • getTActionFourmi

      private int[] getTActionFourmi()
      Return the ids of the aviable actions.
    • faire

      private String faire(int actionId)
      Do a turn action.
      Parameters:
      actionId - the id of the action to do