Code Monkey home page Code Monkey logo

pokerhand's Introduction

Pokerhand

Create the class PokerHand with the following variables and methods:

  • Variables:
    • cards: String with the pokerhand
    • lst_denominations: Represent the numbers of the cards
    • lst_suits: Represent the suits of the cards
  • Methods:
    • split_hand: generate the variables lst_denominations and lst_suits
    • isConsecutive: determines if the numbers in the hand are consecutive with no duplicates
    • is_royal_flush: return True if poker hand is royal flush, also the max value of royal flush card's
    • is_straight_flush: return True if poker hand is straight flush, also the max value of straight flush card's
    • is_four_kind: return True if poker hand is four of a kind, also the max value of card's four of a kind and sum values of the others card's
    • is_full_house: return True if poker hand is full house, also the max value of card's full house and sum values of the others card's
    • is_flush: return True if poker hand is flush, also sum values of the card's flush
    • is_straight: return True if poker hand is straight, also sum values of the card's straight
    • is_three_kind: return True if poker hand is three of a kind, also the max value of card's three of a kind and sum values of the others card's
    • is_two_pair: return True if poker hand is two pair, also the sum value of card's two pair and sum values of the others card's
    • is_one_pair: return True if poker hand is one pair, also the max value of card's one pair and sum values of the others card's
    • get_strong_and_val_max: Identifi the PokerHand and give a weigth, also return de sum values of Poker Hand
    • compare_with: Compare two porkerhands return "WIN" or "LOSS"

pokerhand's People

Watchers

James Cloos avatar Jorge Enrique Vicente Hernández avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.