Naturally order card sprites by their card values.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@300 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-05-15 17:55:33 +00:00
parent 8bcc05be89
commit 84080ecb61
@@ -24,6 +24,7 @@ package com.threerings.parlor.card.client;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import com.threerings.media.AbstractMedia;
import com.threerings.media.image.Mirage;
import com.threerings.media.sprite.FadableImageSprite;
import com.threerings.media.util.Path;
@@ -34,7 +35,6 @@ import com.threerings.parlor.card.data.Card;
* A sprite representing a playing card.
*/
public class CardSprite extends FadableImageSprite
implements Comparable
{
/**
* Creates a new upward-facing card sprite.
@@ -206,12 +206,11 @@ public class CardSprite extends FadableImageSprite
/**
* Compares this to another card sprite based on their cards.
*/
public int compareTo (Object other)
protected int naturalCompareTo (AbstractMedia other)
{
CardSprite cs = (CardSprite)other;
if (_card == null || cs._card == null) {
return 0;
} else {
return _card.compareTo(cs._card);
}