Generic Card Game Server
Summary
TCP/IP Server that allows people to connect and play card games of various
sorts.
http://genericgamesvr.sourceforge.net/
Download source [.zip]
[.tar.gz]
Download build [.zip]
[.tar.gz]
Current features are:
- Chatting capabilities between players, at individual game tables, etc.
- You can play your game at one of 10-different tables.
- Eventually this should become quite more configurable
- You can play 2, 3, and 4-player cribbage.
- Four-player cribbage can be played partnership style
- Four player partnership cribbage has the "pass card"
feature.
- A rough framework for allowing different types of connections to the
server
- Currently it is a native-based interface, which you can read it, but it's
like watching the Matrix (blonde, brunette, redhead ...)
- I may abandon text-based interfaces altogether, even though I still
have an old version that supports it.
- It will support writing clients that can handle Serialized interfaces,
too.
Known Defects
Oh, plenty.
- Cribbage doesn't support muggins, self-scoring.
- Hearts doesn't work at all.
How to Build
Use JDK 1.3 or greater.
Planned Enhancements
Oh, plenty.
- Finish Hearts
- Add Euchre
- Clean up user interfaces (text/human text/Serializable)
- Add login/password mechanism
- Add something to store login profiles (allowing you to save your games,
and have history/ladders)
How to start your server
- Build the source.
- Create a file called telnetj.properties with one line, listed below.
Replace 1009 with the port of your choice.
class.1009=org.brainkandy.gameserver.ClientInterface
-
Run class org.brainkandy.Main, with telnetj.properties in the current
directory, and the "data" directory in the directory beneath the
current directory.
How to play Cribbage (Current version)
- Start up an instance of org.brainkandy.clients.ClientMain.
- Connect to the hosting machine, port 1009. Make sure to include a name
(password optional)
- Have someone else also connect to that machine.
- From there, you're on your own (at least for now.)
How to play Cribbage (Old version)
- Telnet to port 1009 of the server (or whichever port is relevant)
- Choose a name (i.e. Rob) and type "iam Rob"
- If you want to create a Cribbage game:
- To create a 2-player game, type "create cribbage 2"
- To create a 3-player game, type "create cribbage 3"
- To create a 4-player game, type "create cribbage 4"
- To create a 4-player partnership game, type "create cribbage
4p"
- To create a 4-player partnership game that includes passing a card
between partners, type "create cribbage 4pp"
- To make a 61-point game, type "create cribbage [n] 61"
(where n is explained above.)
- After you create your own cribbage game, type "tables". You will
see that you are at a table.
- To find out who else is logged in, type "who"
- To talk to everyone in the system, type "shout <message>".
- To talk to everyone at your table, type "say <message>"
- To talk to an individual, type "whisper to <message>"
- You may not whisper when you're seated at a table.
- To sit at a table, type sit [table#] [seat #]
- i.e.: To sit at table 4, seat 2, type "sit 4 2".
- To get up after sitting down, type "stand".
- When the table is full (use "tables" command to verify) type
"start". A dealer will be selected, cards will be dealt.
- When you look at the status (by typing STATUS)
- "D" means Dealer
- "C" means next card player. (Yes this is ugly)
- If you're playing four-player partnership cribbage, your next task is to
pass a card to your partner. Do this by typing "PASS [card]", i.e.
"pass QH" to pass the Queen of Hearts.
- After everyone has passed, the system will tell you which card you
received. Type STATUS if you want to see it in your hand.
- Everyone discards to the crib by typing "discard [card]".
- After everyone has discarded, the starter card is turned over.
- The player who leads plays a card by typing "play [card]".
- Players continue in turn, typing "play [card]", or
"go" when they cannot go.
- Scoring will occur automatically, both during and after card play.
- To exit, type "bye"
Notes
These are things I must remember to include in the GUI client:
- WHISPER feature
- Add "connected-at" feature to ConnectionMgr.
- Add SAY to game table.