Code Monkey home page Code Monkey logo

flopoker's Introduction

FloPoker

A Symfony project created by Nick Schirmer as a tech demonstration for FloSports in April 2017.

Setup

  1. Install composer dependencies: composer install
  2. Install bower components: bower install
  3. Configure your database: vi app/config/parameters.yml
  4. To run Homestead on Vagrant:
    1. Initialize homestead: php vendor/bin/homestead make
    2. Modify your Homestead.yaml file; be sure the to property under sites is pointing to web directory instead of public and add type: symfony below it. (See the Homestead.yaml.example)
    3. Run vagrant: vagrant up
  5. Initialize database: php bin/console doctrine:schema:update --force

Initial Requirements

  • All players will be able to enter their names into a form
  • Once the start button is pressed the game begins
  • Each player should have N cards. N should be configurable but cannot exceed 5
  • Support the concept of a “turn”, upon which each player can “bet” a certain amount
  • Once all the players have had their turn to bet, render each player’s hand on the UI for everyone to see
  • The highest hand of cards will win the game and receive the total amount, which is the sum of every player’s bet amount
  • You may derive the rules for ranking hands here to determine the winner
  • Maintain a leader-board showing the hands of each player, their respective bet amount and who won each game

Unit Testing

The included PlayingCardBundle has 100% code coverage as a demonstration of unit testing.

vendor/bin/phpunit src/PlayingCardBundle --coverage-html=code-coverage

The code-coverage directory is already included in .gitignore

Additional credit

Thanks to subskybox for the wonderful 5-card Poker Scoring algorithm which was utilized in this project and adapted to work with 3-card and 4-card Poker hands.

Thanks to Derek Stephen McLean for the CSS image sprite for standard 52 playing cards.

flopoker's People

Contributors

nschirmer 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.