aspose file tools*
The moose likes Game Development and the fly likes PokerGame (Simple). Development Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "PokerGame (Simple). Development" Watch "PokerGame (Simple). Development" New topic
Author

PokerGame (Simple). Development

Johannes Thorén
Ranch Hand

Joined: Nov 18, 2008
Posts: 64
Hello everyone. Some years ago i had a task in my old school to develope a simple casino card poker game. (no GUI).
So i did, but at the time i was new to java and i pretty much favoured placing every piece of code intoo the same class, and comments, whats that?

Well now i had my second java course at KTH in Sweden (a university), where we got to learn something called 'the MVC pattern'.
So now i had a thought, to develope the same game again, with the MVC pattern.

So last night and this night i did, from scratch, without any code to begin with.
My goal is to develope a graphical interface (GUI) for the game this summer. Since we're starting with graphical java after the summer and i want to be prepared.

Let me know what you think, if i could solve anything better, should have done anything differently. And if the comments were good enough?

What should my next step be?

i uploaded the file at PokerGame
I tryed to upload the file as an attatchment to this post, but it didint accept rar nor zip files.
I can assure you that it isint a virus, but if you dont want to download, tell me and i'l post every class into this post.

Kind Regards, Johannes Thoren
Mich Robinson
Ranch Hand

Joined: Jun 28, 2009
Posts: 250
    
    1
I suggest you write the program as an applet then people can just click on the link and start playing. As it stands I doubt you'll get too many people wanting to run the risk.


Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Johannes Thorén
Ranch Hand

Joined: Nov 18, 2008
Posts: 64
The thing is that it's a really simple game. The thing that i want to get commented is the way i built the game. Comments, the classes, packets. If i could do something better. So i have to show the code and classes somehow. Maybe i should paste in the classes as replys to this thread and try to explain how they lay in different packages?
Tim Madsen
Greenhorn

Joined: Jan 19, 2010
Posts: 2
About the package , I would create package poker , there I have the main and for the rest I would create poker.model , poker.controller and so on.
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1763
    
    7

Johannes Thorén wrote:The thing is that it's a really simple game. The thing that i want to get commented is the way i built the game. Comments, the classes, packets. If i could do something better. So i have to show the code and classes somehow. Maybe i should paste in the classes as replys to this thread and try to explain how they lay in different packages?


You could do that with UML diagrams, which makes communicating your design to other people a lot easier.
Try making a class diagram so you can show us the static structure of what you already have, and we can take it from there.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Johannes Thorén
Ranch Hand

Joined: Nov 18, 2008
Posts: 64
Ok, i made a classdiagram and a communication diagram. I'l put them in here.
Heres the class diagram:


And here's the comunicationdiagram:


The packages are, Startup, View, Controller, Model.
Startup contains: Startup
View contains: Main
Controller contains: Controller
Model contains:
Player, Card, Suite, Type, HandStrength, Deck
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PokerGame (Simple). Development