• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PokerGame (Simple). Development

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 287
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic