From 84080ecb61afd12366313319669b7414bd064d41 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 15 May 2007 17:55:33 +0000 Subject: [PATCH] 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 --- src/java/com/threerings/parlor/card/client/CardSprite.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/java/com/threerings/parlor/card/client/CardSprite.java b/src/java/com/threerings/parlor/card/client/CardSprite.java index cb4c0547..87b42904 100644 --- a/src/java/com/threerings/parlor/card/client/CardSprite.java +++ b/src/java/com/threerings/parlor/card/client/CardSprite.java @@ -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); }