Class InstructionAva
java.lang.Object
labyrinthe.instructions.deplacement.InstructionDeplacement
labyrinthe.instructions.deplacement.InstructionAva
- All Implemented Interfaces:
Instruction
,InstructionValImm
Cette classe représente une instruction d'avancement.
-
Constructor Summary
ConstructorsConstructorDescriptionInstructionAva
(int pas) Constructeur de la classe labyrinthe.instructions.deplacement.InstructionAva. -
Method Summary
Modifier and TypeMethodDescriptionvoid
executer
(Tortue tortue, Labyrinthe labyrinthe) Cette méthode exécute l'instruction d'avancement.Methods inherited from class labyrinthe.instructions.deplacement.InstructionDeplacement
getPas
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface labyrinthe.instructions.InstructionValImm
verifierImm
-
Constructor Details
-
InstructionAva
public InstructionAva(int pas) Constructeur de la classe labyrinthe.instructions.deplacement.InstructionAva.- Parameters:
pas
- le nombre de pas à avancer
-
-
Method Details
-
executer
Cette méthode exécute l'instruction d'avancement.- Parameters:
tortue
- l'instance de la tortuelabyrinthe
- l'instance du labyrinthe- Throws:
IllegalArgumentException
- si le pas ne respecte pas les bornes(0-15).
-