jagafa.object
Class Card

java.lang.Object
  extended by jagafa.object.Card

public class Card
extends java.lang.Object

Klasse Card: Enthält eine Karte mit Farbe und Kartenwert


Constructor Summary
Card(int color, int value)
          Erstellt ein neues Kartenobjekt
 
Method Summary
 Card copy()
          Get a exact copy of the card
 boolean equals(Card o)
           
 int getColor()
          Get the color of the card
 int getValue()
          Get the value of the card
 int hashCode()
           
 void setColor(int color)
          Setzt die Farbe der Karte
 void setValue(int value)
          Setzt den Wert der Karte
 java.lang.String toString()
          Liefert einen String mit Farbe und Wert der Karte
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Card

public Card(int color,
            int value)
Erstellt ein neues Kartenobjekt

Parameters:
color - The color
value - The value
Method Detail

setColor

public void setColor(int color)
Setzt die Farbe der Karte

Parameters:
color - The new value

equals

public boolean equals(Card o)

setValue

public void setValue(int value)
Setzt den Wert der Karte

Parameters:
value - The new value

getValue

public int getValue()
Get the value of the card

Returns:
The value

getColor

public int getColor()
Get the color of the card

Returns:
The color

copy

public Card copy()
Get a exact copy of the card

Returns:
A copy of the card

toString

public java.lang.String toString()
Liefert einen String mit Farbe und Wert der Karte

Overrides:
toString in class java.lang.Object
Returns:
A String with the print-friendly name of the card

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright 2005 MA Software. All Rights Reserved.