Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: proper use of .java files (layout) Date: Tue, 18 Dec 2012 08:53:58 -0500 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <20fa5c05-6fcc-47ed-9e80-a44975887928@googlegroups.com> <50cfcd0b$0$293$14726298@news.sunsite.dk> <50cfd4b9$0$295$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 18 Dec 2012 13:54:04 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="ffb8f7085759b339c1002252b48331a4"; logging-data="16911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZHNhAU7YrcVKAVl5i0+Iv" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:dxddwcVgmwnMhtgoAaAHhyh86Fk= Xref: csiph.com comp.lang.java.programmer:20443 On 12/18/2012 12:10 AM, Gene Wirchenko wrote: > On Mon, 17 Dec 2012 21:28:07 -0500, Arne Vajhøj > wrote: > >> On 12/17/2012 9:18 PM, Gene Wirchenko wrote: >>> On Mon, 17 Dec 2012 20:55:21 -0500, Arne Vajhøj >>> wrote: >>> >>> [snip] >>> >>>> 13 distinct values with an order but no numeric values >>>> seems a perfect fit for enum to me. >>> >>> An enum does not guarantee an order. >> >> In the Java I use enums have a compareTo method. > > And how would you handle the aces? > > A-6-4-3-2 is ace high, but A-5-4-3-2 is actually 5-4-3-2-A (a > five-high straight). In some "high-low" games, A-5-4-3-2 can be both a five-high straight *and* an Ace with four low cards, possibly winning both the "high" and "low" shares of the pot. -- Eric Sosman esosman@comcast-dot-net.invalid