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:

Known Defects

Oh, plenty.

How to Build

Use JDK 1.3 or greater.

Planned Enhancements

Oh, plenty.

How to start your server

  1. Build the source.
  2. 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
  3. 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)

  1. Start up an instance of org.brainkandy.clients.ClientMain.
  2. Connect to the hosting machine, port 1009. Make sure to include a name (password optional)
  3. Have someone else also connect to that machine.
  4. From there, you're on your own (at least for now.)

How to play Cribbage (Old version)

  1. Telnet to port 1009 of the server (or whichever port is relevant)
  2. Choose a name (i.e. Rob) and type "iam Rob"
  3. If you want to create a Cribbage game:
    1. To create a 2-player game, type "create cribbage 2"
    2. To create a 3-player game, type "create cribbage 3"
    3. To create a 4-player game, type "create cribbage 4"
    4. To create a 4-player partnership game, type "create cribbage 4p"
    5. To create a 4-player partnership game that includes passing a card between partners, type "create cribbage 4pp"
    6. To make a 61-point game, type "create cribbage [n] 61" (where n is explained above.)
  4. After you create your own cribbage game, type "tables". You will see that you are at a table.
  5. To find out who else is logged in, type "who"
  6. To talk to everyone in the system, type "shout <message>".
  7. To talk to everyone at your table, type "say <message>"
  8. To talk to an individual, type "whisper to <message>"
    1. You may not whisper when you're seated at a table.
  9. To sit at a table, type sit [table#] [seat #]
    1. i.e.: To sit at table 4, seat 2, type "sit 4 2".
    2. To get up after sitting down, type "stand".
  10. When the table is full (use "tables" command to verify) type "start". A dealer will be selected, cards will be dealt.
  11. When you look at the status (by typing STATUS)
    1. "D" means Dealer
    2. "C" means next card player. (Yes this is ugly)
  12. 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.
    1. After everyone has passed, the system will tell you which card you received. Type STATUS if you want to see it in your hand.
  13. Everyone discards to the crib by typing "discard [card]".
  14. After everyone has discarded, the starter card is turned over.
  15. The player who leads plays a card by typing "play [card]".
  16. Players continue in turn, typing "play [card]", or "go" when they cannot go.
  17. Scoring will occur automatically, both during and after card play.
  18. To exit, type "bye"

Notes

These are things I must remember to include in the GUI client:

  1. WHISPER feature
  2. Add "connected-at" feature to ConnectionMgr.
  3. Add SAY to game table.