mixmeta4
Class Piece

java.lang.Object
  extended by mixmeta4.Piece
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Checker, Egg, Frogger, Galaxian, King, Knight, Pod, Queen, Winthrop

public class Piece
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Field Summary
 PieceGUI gui
           
 boolean isRed
          deprecated: use getIsRed() to get the colour
 Square square
          deprecated: use getSquare() to get the square
 
Constructor Summary
Piece()
           
Piece(boolean isRed, java.awt.Point[][] redDests, java.awt.Point[][] blackDests)
           
Piece(boolean isRed, java.awt.Point[] redDirections, java.awt.Point[] blackDirections)
           
 
Method Summary
 java.lang.Object clone()
           
 java.awt.Point[][] getDests()
          You shouldn't need to use this directly.
 java.awt.Point[] getDirections()
          You shouldn't need to use this directly.
 boolean getIsRed()
          Return true if the piece is Red.
 Square getSquare()
          Return the square on which this piece is located.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gui

public PieceGUI gui

square

public Square square
deprecated: use getSquare() to get the square


isRed

public boolean isRed
deprecated: use getIsRed() to get the colour

Constructor Detail

Piece

public Piece(boolean isRed,
             java.awt.Point[] redDirections,
             java.awt.Point[] blackDirections)

Piece

public Piece(boolean isRed,
             java.awt.Point[][] redDests,
             java.awt.Point[][] blackDests)

Piece

public Piece()
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getSquare

public Square getSquare()
Return the square on which this piece is located.


getIsRed

public boolean getIsRed()
Return true if the piece is Red.


getDirections

public java.awt.Point[] getDirections()
You shouldn't need to use this directly. See instead getActions in Board.


getDests

public java.awt.Point[][] getDests()
You shouldn't need to use this directly. See instead getActions in Board.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object