1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
enum CardColor
{
ATOUT,
COEUR,
CARREU,
TREFLE,
PIQUE
};
enum DrawableCard
{
EXCUSE(ATOUT,0,R.drawable.xxxx),
UN(ATOUT,1,R.drawable.xxx),
...
VINGTETUN(ATOUT,21,R.drawable.xxx),
AS_COEUR(COEUR,1,R.drawable.xxx),
...
ROI_COEUR(COEUR,14,R.drawable.xxx),
...
private CardColor color;
private int colorValue;
private int resource;
DrawableCard(CardColor col, int value, int resId)
{
this.color = col;
this.colorValue = value;
this.resource= resId;
}
public int getResourceId()
{
return this.res;
}
public CardColor getColor()
{
return this.color;
}
public int getCardValue()
{
return this.colorValue;
}
}; |
Partager