breakout
Class BenSimpleBrick
java.lang.Object
|
+--breakout.DefaultBreakoutComponent
|
+--breakout.BenSimpleBrick
- All Implemented Interfaces:
- BreakoutComponent, Brick
- Direct Known Subclasses:
- BallBrick, OtherBrick
- public class BenSimpleBrick
- extends DefaultBreakoutComponent
- implements Brick
Possible student code that implements a basic brick.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BenSimpleBrick
public BenSimpleBrick(Point location,
Dimension size,
World w,
Color c,
int hp)
BenSimpleBrick
public BenSimpleBrick(Point location,
Dimension size)
paint
public void paint(Graphics g)
- Description copied from interface:
BreakoutComponent
- renders this component to the screen. Origin of graphics
has been translated to upper-left corner of component.
- Specified by:
paint
in interface BreakoutComponent
- Specified by:
paint
in class DefaultBreakoutComponent
hitBy
public void hitBy(BreakoutComponent striker)
- Description copied from interface:
BreakoutComponent
- the component has been struck by the given component
- Specified by:
hitBy
in interface BreakoutComponent
- Specified by:
hitBy
in class DefaultBreakoutComponent