Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Games::Euchre::Player 1.02

    Download button

    No screenshots available
    Downloads: 346  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Chris Dolan | More programs
    Perl Artistic License / FREE
    December 22nd, 2006, 05:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Games::Euchre::Player description

    Games::Euchre::Player is a player class for Euchre card game.

    Games::Euchre::Player is a player class for Euchre card game.

    The four Player objects are used to interact with the humand and computer players, as well as to keep the state of the players hand, whether he bid and whether he went alone.

    CLASS METHODS

    new GAME NUMBER NAME
    Create and initialize a new Euchre player. The number is 1-4.

    INSTANCE METHODS

    getGame

    Return the Euchre game instance to which this player belongs.

    setTeam TEAM

    Record the Team instance that this player belongs to.

    getTeam

    Return the Team instance to which this player belongs.

    setAI AI

    Record the AI instance for this player.

    getAI

    Return the AI instance for this player.

    setAlone

    Indicate that this player has chosen to go alone in the current hand.

    setBid

    Indicate that this player has chosen to choose trump in the current hand.

    wentAlone

    Returns a boolean indicating whether this player chose to go alone on a bid.

    isBidder

    Returns a boolean indicating whether this player called the trump suit during bidding.

    getName

    Return this player's name

    getNumber

    Return this player's number, between 1 and 4

    getHand

    Return the Games::Cards::Hand object representing this player's current hand.

    getCards

    Return an array of the Games::Cards::Card objects held in the player's hand.

    resetGame

    Clear all of the state for the current game and get ready for the next one.

    resetHand

    Clear all of the state for the current hand and get ready for the next one.

    bid TURN

    Allow the player to choose trump or pass. Returns one of: H, C, D, S, N, HA, CA, DA, SA, NA, or undef. If the player has an AI instance set, that is invoked. Otherwise a pathetically simple AI decides the bid.

    pickItUp

    Allow the player, as dealer, to select which card to trade for the turned up card. This method performs the actual trade. If the player has an AI instance set, that is invoked. Otherwise a pathetically simple AI chooses the card.

    playCard TRICK

    Allow the player to select which card to play on the current trick. This method performs the actual play. If the player has an AI instance set, that is invoked. Otherwise a pathetically simple AI chooses the card.

    isLegalBid TURNNUMBER BID

    Given a bid, return a boolean indicating the validity of that bid. The bid is tested for structure (one of H, C, D, S, N, HA, CA, DA, SA, NA, or undef), tested against the bidding round (only the turned-up card suit can be called in round 1 , and may not be called in round 2), against the game options (hang-the-dealer, no-trump).
    This is called from the bid() method.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    player class | Euchre card game | Perl module | Games::Euchre::Playe | player | class

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM