de.htwdd.rosenkoenig.game
Class Card

java.lang.Object
  extended by de.htwdd.rosenkoenig.game.Card

public class Card
extends java.lang.Object

This class represents a card in the game.


Field Summary
private  Position value
           
 
Constructor Summary
Card()
          Ctor - emtpy
Card(int x, int y)
          Creates a new card with the defined values.
 
Method Summary
 int getDistance()
          The distance is two, two, or three.
 Position getValue()
          Getter of the property value
 void setValue(Position value)
          Setter of the property value
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private Position value
Constructor Detail

Card

public Card()
Ctor - emtpy


Card

public Card(int x,
            int y)
Creates a new card with the defined values.

Parameters:
x -
y -
Method Detail

getValue

public Position getValue()
Getter of the property value

Returns:
Returns the value.

setValue

public void setValue(Position value)
Setter of the property value

Parameters:
value - The value to set.

getDistance

public int getDistance()
The distance is two, two, or three. If one value is <> 0 then the other must have the same value or zero.

Returns:
The distance of this card.

toString

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