public class Card
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
category |
private int |
number |
| Constructor and Description |
|---|
Card(int category,
int number)
Create a new card
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Check if this objects is equal to another object
|
int |
getCategory()
Get the category of this card
|
int |
getNumber()
Get the number of this card
|
java.lang.String |
toString()
Return the card as a string
|
public Card(int category,
int number)
category - The category of this cardnumber - The number of the card in the categorypublic int getCategory()
public int getNumber()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object to compare to