Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 18 Dec 2012 09:05:25 -0600 Date: Tue, 18 Dec 2012 15:05:22 +0000 From: lipska the kat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: proper use of .java files (layout) References: <41e38b5a-2aa7-43a4-9bc8-87e0eb4a977c@googlegroups.com> In-Reply-To: <41e38b5a-2aa7-43a4-9bc8-87e0eb4a977c@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 41 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-p0H+kZAKqGmKJqfHlhOXeWuA0AhQ8NypYS2GUpRNE4mb75TMLwuKHrHiCTYERe+HPCrwVeArxVxDpRV!317cn87vIvYY40vx4+uRY9Z5xpPTOxiLHsSa0Rf+z0UNLsiyKTa6lxDw99O2rafR1OVlwM4e4K0= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3075 Xref: csiph.com comp.lang.java.programmer:20447 On 18/12/12 14:32, infinitum3d@hotmail.com wrote: > I'm not exactly sure what card game I will be programming at this time. Interesting, what do our procedural programmer(s) make of this then. The OP isn't sure what game he will be programming .... I suggest you start writing some code Start with Card ... what form should Card take, from what you've said I'll venture that Card might be abstract, all cards have a value (assumption) so the value could be in Card or at least a placeholder to be getting on with ... maybe Value is a Class or Interface the value of a card could be '2' or 'gatekeeper' or 'Death' if you are playing Tarot. DefaultCard could extend this, DefaultCard might have a 'Rank' so an instance of DefaultCard might contain a 2 (from Card) and a 'Heart' from DefaultCard .. the two of Hearts. TarotCard extends Card, some tarots have values some don't, that's OK, it's still a Card. More importantly your Deck will deal with Cards only List deck doesn't say anything about Card other than it is a Card, it can still be shuffled, dealt, cut etc etc, where do you think the methods deal, shuffle and cut go ? Once this is out of the way you will find yourself overwhelmed with ideas for card games, maybe you can even invent your own, you've already got the base abstractions written and tested Don't get too caught up in the detail to begin with, get the grunt work out of the way first and MOST IMPORTANTLY don't be afraid to throw code away, If you make a mistake you will have learned something, use that knowledge to improve your design and move on. Let us know how you get on. Good luck and enjoy lipska -- Lipska the KatŠ: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun