Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Top Challenge Entrants

  # User Points
  1 jaytea 587
  2 [Znork] 303
  3 urza 297
  4 Ag2X 288
  5 dr_Eamer 255
  6 Albie 199
  7 Chessnut 197
  8 A Noniem 194
  9 zzattack 186
  10 Kol 185
  11 m910q 168
  12 Sephiroth 115
  13 patje 114
  14 Auron956 114
  15 chid 110
  16 Ohad2121 92
  17 SkorpSSS 87
  18 DixrouE 84
  19 Suchorski 83
  20 ^Vampire^ 74
Challenge:Smallest $holdem()
Start:May 24th 2007
End:June 7th 2007
Description:

Texas Hold'em

In this challenge you are asked to code an alias that will return what the score of a player's hand is.

Card naming scheme



AAce
22
33
44
55
66
77
88
99
1010
JJack
QQueen
KKing
DDiamond
HHeart
SSpade
CClub


Specfications



The alias will accept one parameter ($1) which should be exactly seven cards.

Each card is seperated by a space and represented in the format:

[card][suit]


Parameter one ($1) is the only used parameter; all of the other parameters ($2-) should be ignored.

Potential incorrect inputs may include (but are not limited to) the following:

  • Incorrect number of cards (not 7 cards)
  • Duplicate cards (pay attention to this one!)
  • Incorrect card formatting, e.g. 4DD instead of 4D


  • In each of these cases and any other erroneous inputs, the identifier should return $null. You will assume anything can be supplied as a parameter. All of the above conditions will be checked.

    Your alias must be case-insensitive, e.g. "4d" is the same as "4D".

    Scoring System



    In terms of the scoring system, it is up to you to come up with a scoring system. Whatever scoring system you use, you have to follow this simple rule; the higher the number, the higher the hand is rated, e.g. 500 could be three of a kind, 400 could be two pair.

    You are allowed to use decimals, or even negative values, just as long as it follows the above rule.

    Do not forget you need to factor in high cards and kickers. You should always have five cards factored into your score.

    Hands & Their Rank







    Example:


    $holdem(4C 4H 10D AC AS 4D 7C)
    $holdem(AH 10C 3H 4H 6S 2C 5D)
    $holdem(AS JS QS KS 4S 10S 2C)
    $holdem(8C 10C 9C 6C 7S 7C AD)
    $holdem(QH 2S 7D QC 5D QD QS)
    $holdem(KD 9D 7D 5D AS 2D JC)
    $holdem(8D 7C 6D JS QH 5S 4H)
    $holdem(KC QH QS 7C 4H QC 9D)
    $holdem(2D JS 10H 9D 8S JD 9H)
    $holdem(4S KC 9D 8S 4H KH QD)
    $holdem(KC QS 8D 5S 2D AS 3D)
    $holdem(Kd Ks Kh Kc As)
    $holdem(Kd Ks Kh Kc As 10s Kd)
    $holdem(K10 Kh 9s 10h 2s J9 7d)
    $holdem(K J Q 10 9 8 7)
    Hand
    Fours full of Aces
    Straight 2-6
    Royal Flush
    Straight flush 6-10
    Four of a kind, queens, 7 kicker
    Flush, diamods, king high
    Straight, 4-8
    Three of a kind, queens, King kicker
    Two pair, Jacks and Nines, 10 kicker
    Two pair, Kings and fours, Queen kicker
    Ace High
    $null
    $null
    $null
    $null



    * These examples do NOT specifically represent what the alias should return. They should only be used as a reference.


    External sources





    Rules:

  • Alias name must be 'holdem'
  • No dlls, coms, sockets or regular expressions
  • One submission per user.
  • Script must give correct results after consecutive runs.


  • Testing conditions:

  • Alias will be run on mIRC v6.21 and loaded into the remotes section.
  • Your code will be taken for EXACTLY as-is.
  • Alias will be run on a mIRC with no variables set - a clean mIRC.


  • Countcode:
    (this is a temporary replacement for countcode... JavaScript needs to be enabled.)