DESIGN!

Well here it is, the start to a new and incredible project that I’ve had in mind for a couple of weeks now. I’m really excited about this one, and I wanted to start coding last night, but I really want to do this properly. So, I’ve decided to design the whole thing up front. Everything from the class names to function names, window design to code organization.

I’ve decided to also start using Eclipse to put this project together. A couple of people in my graphics course were using it for their final project, and they seemed a hell of a lot more organized than I was.

So here it is. To start off I’ll break down all the pieces of the game into classes that I’ll need to implement.

Disclaimer: By no means is this the best way of doing things. After all, this is my first attempt at doing something like this by myself. When it comes down to it, I'm just a n00b... an amateur.

The Problem: To make a game that connects people over the internet and allows them to play Briscola together.
pretty vague, huh?

Game Class:
This class will take care of the mechanics of the game and hold the game state. It will house all the rules and take care of how the players will interact with the game. It also needs to have a way to represent a deck cards.

Card Class:
This class will allow me to create a card. It will basically just contain 2 variables, number and suit, and the requisite get and set methods.

Deck Class:
This class will hold many Card objects. For Briscola it will need 40: 10 of each suit. It will also need functions to shuffle and cut the deck. As well as a function to remove 1 card from the top of the deck (go STACK!!!)

Client Class:
This class will hold everything that someone needs to be able to play the game. Since this is going to be internet based, it will have to talk to whoever is hosting the game. It contain the GUI that the user will interact with, and everything it needs to connect to the server and receive commands from the Game object.

Server Class:
This class will work directly with the Game object. It will receive commands from each of the clients and pass them onto the Game. It will also need to receive commands from the Game and pass them onto the players.

Player Class:
This class will represent a player. It will hold the cards that each player has in hand as well as the cards that they have won. It will also need to total up the points from those cards at the end of the game. This class will fit in somewhere with the junk I’ve described above, probably in the Game class.

Team Class:
This one just came to me like 10 seconds ago. This class is needed for when playing a 2-on-2 game of Briscola. It will have to store the cards that the teams have won and which players are on that team. It might be better to always have a Team object even if playing 1-on-1, just to make implementation easier, but I think that might get screwed up when playing 1-on-1-on-1. Guess I’ve got a lot more design problems than I originally though.

Also, maybe the Player class should inherit from the Team class… or the other way around?

Ontop of all this, I’ll also need tons of artwork. I’ll probably go out and buy a couple different decks of italian cards and scan them in.

Then somewhere inside the server and client classes I’ll need to define what the commands will be and what they will do.

And inside the game class I’ll need find a way to make the rules modular, so I can easily switch between 2, 3 or 4 player briscola, as well as make a ruleset for Covello Brisk (I really want to do that, expose it to the world!)

So, I think thats good for a first post, kind of long though. I’ll review this stuff and try to iron out the problems and inconsistencies.

Leave a Reply

%d bloggers like this: