This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PokerGame (Simple). Development

 
Johannes Thorén
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 260
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Johannes Thorén
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1951
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Johannes Thorén
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic