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.
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?
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.
Joined: Nov 18, 2008
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
Player, Card, Suite, Type, HandStrength, Deck
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com