Hello everybody,
I’m writing (so it’s a WIP) a Card Game Applet using PulpCore as the Game/Graphics Engine. It is an implementation of a popular russian card game, called “Durak” (Idiot). You can learn about the Game mechanics here: http://www.pagat.com/beating/durak.html or http://en.wikipedia.org/wiki/Durak
I could simply sum up that durak is a strategy game where the purpose is to not be last player that still has cards in his hands. There is always a defender which has to cover cards and up to two attackers that attack. The attacker and defender roles rotate after each round. But there is much more to the game than this.
Actually, since it is a personal project for learning purposes, as of now, I’d like to have suggestions from you about my program structure / programming style. Before I polish and finish this project I’d like to ensure that the code is “good” (aspects like reusability, comprehensibility…). Since there is no such subforum, I posted here, which is not bad either since I’m going to finish this project soon anyway and then just post the finished version in this thread.
So here is a link to a “playable” (it is not yet everything implemented) version: http://storytube.kilu.de/durak7/
Without knowing the rules of the game it seems random, so you should have a look at the rules. Controls are double-clicking anywhere for taking the cards or not adding an attacker card. And for putting a card onto the arena: clicking and “throwing a card in the arena” (click, drag fast enough and release).
Here is a link to the netbeans project with sources: http://storytube.kilu.de/Durak_0.8.tar.gz
Basically, I’d just like to have critic about the source code. It can be anything, but especially critic about the “macro-design” (so to say), how well/bad the inter-class-dependencies (i hope you understand what I mean) are designed, and how well/bad the class design and the use of design patterns is. Of course I’m also interested in everything else that you find to critise.
My basic design:
I’ve used the MVC (more MV) pattern for the whole program structure. First of all I’d like to know if I implemented it reasonable.
I tried to stay true to the paradigm “composition over inheritance”. I also created a little bit javadoc which can be found in the package. I’d also like to know ideas about alternative, maybe more efficient ways of structuring a 2D card game in java and maybe suggestions if it would have been easier to implement specific things in other languages (because of other language features).
Ok, I hope someone looks at the source code!
Btw, if someone is good at graphics creation and is interested in contributing to this project: I’d need general advice about designing the playing table (like where the opponents should sit, how big the cards should be), a background graphic, a logo, a label for the player names and a very small defender symbol (like a shield or something)
best regards,
newgame