gizmoball.board
Class Bumper

java.lang.Object
  extended by gizmoball.board.Gizmo
      extended by gizmoball.board.Bumper

public class Bumper
extends Gizmo

This class represents a bumper gizmo, such as a square bumper, that extends the abstract Gizmo class. The bumper's action when it gets triggered is to change its color to the opposite color.

Author:
Michal Wexler

Field Summary
 
Fields inherited from class gizmoball.board.Gizmo
color, connections, name, reverseConnections
 
Constructor Summary
Bumper(java.lang.String name, java.awt.Color color, Shape shape)
          Constructs a Bumper gizmo.
 
Method Summary
 void action()
          the action that the bumper takes when it gets triggered.
 
Methods inherited from class gizmoball.board.Gizmo
getColor, getName, getShape, getTriggeredGizmos, getTriggeringGizmos, setColor, triggerConnections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bumper

public Bumper(java.lang.String name,
              java.awt.Color color,
              Shape shape)
Constructs a Bumper gizmo.

Parameters:
name - the name of the bumper
color - the color of the bumper
shape - the shape of the bumper
Method Detail

action

public void action()
the action that the bumper takes when it gets triggered.

Overrides:
action in class Gizmo