boardGame
Class RoundPiece

java.lang.Object
  extended by java.util.Observable
      extended by boardGame.Piece
          extended by boardGame.RoundPiece

public class RoundPiece
extends Piece

Example playing piece. This class is only here as an example, and may be discarded.


Constructor Summary
RoundPiece()
          Constructs a RoundPiece.
RoundPiece(java.awt.Color color)
          Constructs a RoundPiece of the given color.
RoundPiece(java.lang.String name, java.awt.Color color)
          Constructs a RoundPiece with the given name and color.
 
Method Summary
 void paint(java.awt.Graphics g, java.awt.Rectangle r)
          Draws this RoundPiece on the given Graphics.
 
Methods inherited from class boardGame.Piece
canMove, canMoveTo, dump, getBoard, getColumn, getName, getRow, getSpeed, isDraggable, isOnBoard, isOnBoard, isSelectable, move, moveTo, moveToTop, place, redraw, redraw, remove, setDraggable, setSelectable, setSpeed, toString
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoundPiece

public RoundPiece()
Constructs a RoundPiece.


RoundPiece

public RoundPiece(java.awt.Color color)
Constructs a RoundPiece of the given color.

Parameters:
color - The Color of the new piece.

RoundPiece

public RoundPiece(java.lang.String name,
                  java.awt.Color color)
Constructs a RoundPiece with the given name and color.

Parameters:
name - A name for the new Piece.
color - The Color of the new Piece.
Method Detail

paint

public void paint(java.awt.Graphics g,
                  java.awt.Rectangle r)
Draws this RoundPiece on the given Graphics. Drawing should be limited to the provided java.awt.Rectangle.

Specified by:
paint in class Piece
Parameters:
g - The graphics on which to draw.
r - The rectangle in which to draw.