瀏覽單個文章
doberman
*停權中*
 

加入日期: Mar 2004
文章: 477
定義了Suit, Rank這些variable type,後面method裡也是得回傳object裡的這些variable type.

改完試試看不知有沒好?

/*------------------------------------------
public Card(Suit suit, Rank rank, int value)
{
this.suit = suit;
this.rank = rank;
this.value = value;
}

/**
* Get the suit of the card
* @return String
*/
public Suit getSuit()
{
return this.suit;
}

/**
* Get the rank of the card
* @return String
*/
public Rank getRank()
{
return this.rank;
}

/**
* Get the actual value of the card
* @return int
*/
public int getValue()
{
return this.value;
}



}
-----------------------------*/
 
舊 2006-09-28, 09:05 AM #12
回應時引用此文章
doberman離線中