Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: Help with Deck of cards assignment and getting it to deal... Date: Sun, 03 Aug 2014 16:01:43 -0400 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 3 Aug 2014 20:01:46 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="b896cb427f8c4d19d14880347aa9d6ce"; logging-data="8595"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197LQ03AArp8je9RMZhugUyLK3WYywbesk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0 In-Reply-To: Cancel-Lock: sha1:+ackwm5W8lihECVEzyhJnuxO01Q= Xref: csiph.com comp.lang.java.programmer:29537 On 08/03/2014 03:45 PM, Jeff Higgins wrote: > On 08/03/2014 03:00 PM, Eric Sosman wrote: >> Given the variety of card games, Comparable is a wrong-headed >> approach for ranks, for suits, and even for hands. >> > Perhaps, but just for my own enlightenment, allow me one more interface > and then describe a *simple* game that that cannot be implemented given > the provided interfaces. > > package scratch; > > import java.util.Collection; > > /** > * A Card game controller. > * While we have hands to play, compare hands. > * > * @author jeff > * > */ > public interface Ruler extends Iterable, > Comparable> { > > } > > Well, that could probably have been done better but you get my drift.