README.EXAMPLE

README.EXAMPLE · 5.9 KB

From the archive CoffeeMudEntry.zip

Download the archive   « Back to the archive contents

Poker Dealer for CoffeeMud
--------------------------

Purpose:
--------
The purpose of this code is to comply with the MudMagic.com Text Game Code 
Challenge bonus example.

License:
--------
The source code for this project is distributed under the BSD license.

Compatibility:
--------------
The example will work with versions 4.7.6 (public) of the CoffeeMud code 
base and higher.

The example requires the DeckOfCards library found in this package.

Structure:
----------
The example consists of 1 source file and 1 precompiled class file, located
in the example/com/planet_ink/coffee_mud/Behaviors folder.  These files 
are:
PokerDealer.java
PokerDealer.class

Installation:
-------------
The files mentioned previously should be copied into the 
com/planet_ink/coffee_mud/Behaviors folder, which is located
in the main CoffeeMud installation folder.  

Precompiled versions of those files (*.class) are also available.  Those
files should be copied into the same place as the *.java files.

After copying the source files, they may be recompiled if desired.  Your 
mud should be rebooted in order to make the files available to the system.

The example is implemented as a Behavior object, which can be added to 
a mob to create an interactive poker dealer.  

To do this, create and log in as an Archon character to your CoffeeMud
server as described in the CoffeeMud Installation Guide.  From the
command line, issue the following command:
CREATE MOB GENMOB

When the menu comes up, change his name and display text as follows:
1. Name: 'a dealer'.
2. Display: 'a dealer stands here.'.

Now, enter menu option '20' to add/remove behaviors.
Enter 'PokerDealer' to add the behavior.
You may press enter again to enter NO parameters, or you may enter one or 
more of the following parameters, each space delimited:
Parameters : (GAME=[gameint]) (MINPLAYERS=[numplayers]) (ANTI=[antiamount])
Example    : game=2 minplayer=4 anti=5.0
Where gameint is one of the following: STRAIGHTPOKER=0, 5CARDSTUD=1, 7CARDSTUD,
DRAWPOKER=3

Now that you've created a dealer and installed the behavior, you may want
to save him by entering SAVE ROOM.

Usage:
------
The dealer will interact with non-mob players through the use of the SAY
command.  He will instruct players who enter the room with him on what
they must do to play, and will issue further instructions as the game
proceeds on what they must do to complete the game.

The administrator player also has certain powers with respect to the 
poker dealer.  The most important of which is the ability to use the SAY
command to change which poker game the dealer will play.  An Archon saying
one of the following phrases: 'straight poker', 'five card stud',
'seven card stud', or 'draw poker' will cause the dealer to change which 
game he is dealing.  A normal player saying one of those phrases will have
no effect.

The dealer will start off by waiting around for players to enter the room.
When potential players enter, he will inform them of the game he is dealing
and how much the player must drop on the ground to anti.  Once the first
player drops an anti, a timer will start giving the other players limited
time to drop their antis before the cards are dealt to the players and
the game begins.  If MORE than ONE player does not drop an anti, the 
dealer will cancel the game.  

The players may look at their cards by doing a LOOK HAND.
During the stud games, the players may see what other cards are "turned up"
in front of the other players by doing a LOOK <playername>.
The players bet by dropping money on the ground.
The players may end their betting turn by saying 'raise', 'call', 'pass', or
'fold'.
During draw poker, the players will draw cards by saying which cards they 
want to drop (by order-number, not by name).  The dealer will give instructions 
to this effect, along with an example for the players to follow.

At the end of the game, or if a sufficient number of players fold, the dealer
will announce the winner and award the pot.

Remember, if you need money to play with, you can use your Archon character
to issue the command: create 1000 gold, followed by get all gold.  But make
sure you do this in a different room than the poker dealer, as the poker
dealer assumes ALL money on the ground is part of the pot and protected!

Compliance:
-----------
Most of the compliance rules for the example are satisfied by proper
packaging.  Still, the rules are listed here:

* Guidelines to submit bonus:
* -Bonus code should be placed in a directory within submitted code archive 
* called: example 
> files are located in example/com/planet_ink/coffee_mud/Behaviors
* -All files dealing with the example should be placed in the example directory, 
* with exception to a README.EXAMPLE that can be placed in the top directory
> done.
* -No mention of the example program should be commented or discussed anywhere 
* within the primary challenge software
> done.
* -To be eligible of bonus points, the example should be part of your initial 
* challenge submission. (no updating after submission)
> will be submitted together

* Update to current challenge: Bonus +10 for working example. This bonus
* is for an all inclusive card game example. To be awarded the +10 ( for a
* scoring of up to 80)
* the +10 bonus breakdown scoring is: 
* creativity of card game in interplay operations - 2pt
> I think it's creative. :)
* documentation for installation of working example- 2pt
> documentation is in this file in the Usage section
* code commenting and design of example - 2pt
> code is fully commented.  Design is in compliance with CoffeeMud standards.
* incorporation of example with hand and deck library as well as running
* game (does it work)- 2pt
> example uses playingcard, handofcards, deckofcards.  It's multi-player, 
> and (short of unknown bugs) works.
* follows bonus submission guidelines - 2pt
> done.

Site Stats

Snippets: 1791
Codebases: 571