

                           TPokerEngine Version 1.1
                   Copyright (c) 1996 SilverDisc Software 
                            A Delphi 2.0 Component


--------------------------
INTRODUCTION & LEGAL STUFF
--------------------------

Thank you for evaluating the Delphi Component TPokerEngine.  This sofware
component was written by SilverDisc Software.  TPokerEngine is provided
"as is" and there is no stated or implied warranty of any kind.  Use at
your own risk!

Feel free to distribute this software in any way, providing all of the
files are included.  These files are not to be modified in any way.  

    Readme.txt            6,153
    PokerEngine.dcu      13,360
    PokerEngine.dcr         468
    Project1.exe        210,944
    Project1.dpr            188
    Unit1.dfm             1,557
    Unit1.pas             3,429


Note that TPokerEngine, is just that.  A Poker Engine.  It doesn't 
contain any support for the actual display of cards.  There are a couple
of different card components available, so I've tried to design
TPokerEngine to be compatible with them all!  In fact, you can use
TPokerEngine even without a card component, check out the sample program.
Albeit, its not that attractive... ;-)

------------
INSTALLATION
------------

I wrote TPokerEngine because I wanted to write a poker type game, but I
wanted to reuse the code to write in yet another poker game.  Lo and
behold.... instant component.  So here's how to use it.

Uncompress the component and all the other stuff into a new directory.
May I suggest /delphi/TPokerEngine?  Then, load Delphi 2.0 (because this
component isn't compiled for Delphi 1.0).  Select Install... from the
Component menu.  Click the Add button.  Then click the Browse button and
go find the PokerEngine.DCU and click on it.  You'll have to rebuild your
library, but that should happen automatically.

Now that it is installed, drop one on the form and away you go!


-----------------------
HOW TO USE TPOKERENGINE
-----------------------

Ok!  Let's get to the good stuff!!!

Properties: Card1, Card2, Card3, Card4, Card5, WinHand, WinIndex
   Methods: CheckCards


  CARD1, CARD2, CARD3, CARD4, CARD5
  ---------------------------------

  Card1 through Card5 holds strings of the cards.  They are:
    Hearts:
      AH, 2H, 3H, 4H, 5H, 6H, 7H, 8H, 9H, TH, JH, QH, KH
    Diamonds:
      AD, 2D, 3D, 4D, 5D, 6D, 7D, 8D, 9D, TD, JD, QD, KD
    Spades:
      AS, 2S, 3S, 4S, 5S, 6S, 7S, 8S, 9S, TS, JS, QS, KS
    Clubs:
      AC, 2C, 3C, 4C, 5C, 6C, 7C, 8C, 9C, TC, JC, QC, KC

  For example, if Card1 := 'TH' and Card2: = 'JH' and
  Card3 := 'TD' and Card 4 := 'JD' and Card5 := 'AH'
  then you got yourself two pair!

  Make sure that the card code is UPPERCASE.


  WINHAND and WININDEX
  --------------------

  WinHand is a string that holds the results of the 5 cards.
  In the above example, WinHand would read 'Two Pair'.

  WinIndex goes hand-in-hand with WinHand.  In the above example,
  WinIndex would be 2.

  Here's a quick chart:

          WININDEX       WINHAND
          --------       -------
              0          'Lose'
              1          'One Pair'
              2          'Pair Of Tens Or Better'
              3          'Two Pair'
              4          'Three Of A Kind'
              5          'Straight'
              6          'Flush'
              7          'Full House'
              8          'Four Of A Kind'
              9          'Straight Flush'
              10         'Royal Flush'

  A WinIndex of 1 indicates that the poker hand has one pair from 
  '2' to '9'.  A WinIndex of 2 indicates that the poker hand has a pair
  from 'T' to 'A'. 


  CHECKCARDS
  ----------

  The one method that TPokerEngine uses is CheckCards.  Simply
  call CheckCards when you fill up Card1 through Card5 and watch
  for the WinHand and WinIndex.

Be sure to check out the example code!!!


------------------------
REGISTRATION INFORMATION
------------------------

TPokerEngine is free for non-commercial use.  It is for this
reason I didn't put in any nag messages.  If you plan to 
create a commercial poker game using this component, please send
$10.00 US (or $10.00 Canadian if you are a Canadian resident) to:

    SILVERDISC SOFTWARE
    1030 SOUTH PARK STREET
    SUITE 404
    HALIFAX, NS, CANADA
    B3H 2W3

The price includes the price of Internet shipping.... ;-)  If you
would like a disk, please add another $8.00 US (or $8.00 Canadian
if you are a Canadian resident).

Also, while you're at it, why not send me a copy of your program!
I'd love to give it a 'hand'!!!!


---------------
FUTURE VERSIONS
---------------

Depending on the response and support of TPokerEngine, I will be
adding to this component as the requests come in.  If you register
TPokerEngine, you will be registered for any future version as
well.

If you have any comments on how to improve this component, drop
me an E-Mail and I'll get on it!  Look for a Home Page for 
TPokerEngine in the future.  I'll start on it as soon as I finish
my other Delphi projects!!! ;-)

In TPokerEngine version 2, I plan to add support for Wild Cards.

Also, the next version will have a Checking routine that can 
analyze two different hands with the same WinIndex (for example,
two Full Houses) and return which is the greater of the two.

The only problem is:  what if, for example, two people have 
a Royal Flush, one in hearts and one in spades?  Who wins?  Is
there one suit that is dominant over another?  If there is a poker
buff out there who knows this answer, let me know, so I can
write up this routine!  ;-)


--------------------
UPGRADES & BUG FIXES
--------------------

1.1 - The 4-of-a-kind logic was fixed.  I forgot to include one
      particular combination of cards, but it works now!


-----------
OTHER STUFF
-----------

For more information please don't hesitate to drop me a line at:
skellock@atcon.com.  (Steve Kellock).


Good luck!

