GameField
Class Shape

java.lang.Object
  extended by GameField.Shape

public class Shape
extends java.lang.Object

Class Shape Represents the shape of a card


Field Summary
static int BLUE
           
private  int color
           
static int EMPTY
           
static int FULL
           
static int HATCHED
           
static int ONDULED_RECT
           
static int ORANGE
           
static int OVAL
           
private  int pattern
           
static int RECTANGLE
           
static int RED
           
private  int type
           
 
Constructor Summary
Shape(int pattern, int type, int color)
           
 
Method Summary
 int getColor()
          Get the value of color
 int getPattern()
          Get the value of pattern
 int getType()
          0 : rectangles 1 : ovals 2 : onduled rectangles
 void setColor(int value)
          Set the value of color
 void setPattern(int value)
          Set the value of pattern
 void setType(int value)
          0 : rectangles 1 : ovals 2 : onduled rectangles
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BLUE

public static final int BLUE
See Also:
Constant Field Values

color

private int color

EMPTY

public static final int EMPTY
See Also:
Constant Field Values

FULL

public static final int FULL
See Also:
Constant Field Values

HATCHED

public static final int HATCHED
See Also:
Constant Field Values

ONDULED_RECT

public static final int ONDULED_RECT
See Also:
Constant Field Values

ORANGE

public static final int ORANGE
See Also:
Constant Field Values

OVAL

public static final int OVAL
See Also:
Constant Field Values

pattern

private int pattern

RECTANGLE

public static final int RECTANGLE
See Also:
Constant Field Values

RED

public static final int RED
See Also:
Constant Field Values

type

private int type
Constructor Detail

Shape

public Shape(int pattern,
             int type,
             int color)
      throws GameFieldException
Throws:
GameFieldException
Method Detail

getColor

public int getColor()
Get the value of color

Returns:
the value of color

getPattern

public int getPattern()
Get the value of pattern

Returns:
the value of pattern

getType

public int getType()
0 : rectangles 1 : ovals 2 : onduled rectangles


setColor

public void setColor(int value)
Set the value of color


setPattern

public void setPattern(int value)
Set the value of pattern


setType

public void setType(int value)
0 : rectangles 1 : ovals 2 : onduled rectangles


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
représentation de l'objet