Code Monkey home page Code Monkey logo

poker-simulation's Introduction

Poker Simulation

This program simulates a game of poker with a specific number of players (from 2 to 6). The game can not be played by real people. There is no betting and there are no specific rules, it's basic poker where everyone draws 5 cards. The program prints a number to the terminal representing the combination on every hand. Here are the translations to the numbers which are printed:

  • 0: No combination
  • 1: Pair
  • 2 Two Pair
  • 3: Three of a Kind
  • 4: Straight
  • 5: Flush
  • 6: Full House
  • 7: Four of a Kind
  • 8: Straight Flush
  • 9 Royal Flush

The program does not account for the highest card and just returns the best combination every hand has. The hand also gets printed. Every card looks similar to this: |5, 2| The first number (in this case 5) stands for the value of the card (ranging from 2 to 14), while the second number represents the symbol of the card(1 - Heart, 2 - Diamond, 3 - Club, 4 - Spade).

How to run

  1. Clone the code anywhere on your computer
  2. Run make to compile it.
  3. Run the program with ./a.out PLAYERS, PLAYERS being the number of Peers who are playing.

poker-simulation's People

Contributors

schweini07 avatar

Watchers

James Cloos avatar  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.