tfg.subsumption
Class HalfTurn

java.lang.Object
  extended by tfg.subsumption.HalfTurn
All Implemented Interfaces:
ButtonListener, Behavior

public class HalfTurn
extends Object
implements Behavior, ButtonListener

Comportamento responsável por dar uma volta de 180 graus, invertendo a direção do robô.

**********************************************************************
UNIFRA - Centro Universitário Franciscano
Graduação em Sistemas de Informação
Trabalho Final de Graduação, 1º Sem/2009
Orientador: Prof. MSc. Guilherme Dhein
Orientando: Douglas Pereira Pasqualin

COPYLEFT (Todos os direitos de reprodução autorizados deste que preservados
o nome da instituição e dos autores).
**********************************************************************

Version:
0.2
Author:
Douglas Pasqualin

Field Summary
(package private)  boolean pressed
           
(package private)  SimpleNavigator robot
           
(package private)  Side side
           
 
Constructor Summary
HalfTurn(SimpleNavigator navigator)
          Comportamento responsável por dar uma volta de 180 graus, invertendo a direção do robô.
 
Method Summary
 void action()
           
 void buttonPressed(Button b)
           
 void buttonReleased(Button b)
           
 void suppress()
           
 boolean takeControl()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

robot

SimpleNavigator robot

side

Side side

pressed

boolean pressed
Constructor Detail

HalfTurn

public HalfTurn(SimpleNavigator navigator)
Comportamento responsável por dar uma volta de 180 graus, invertendo a direção do robô. Método construtor, deve ser passado um SimpleNavigator já instanciado e configurado.

Parameters:
navigator - objeto do tipo lejos.navigation.SimpleNavigator
Method Detail

action

public void action()
Specified by:
action in interface Behavior

suppress

public void suppress()
Specified by:
suppress in interface Behavior

takeControl

public boolean takeControl()
Specified by:
takeControl in interface Behavior

buttonPressed

public void buttonPressed(Button b)
Specified by:
buttonPressed in interface ButtonListener

buttonReleased

public void buttonReleased(Button b)
Specified by:
buttonReleased in interface ButtonListener