Skip to content

praisetompane-experiments/app_poker

Repository files navigation

app_poker

build status

Objectives

  • a Poker hand evaluator.
    • currently only supports High Games:
      • features:
        • calculate highest hand rank possible for a 5 card hand.
        • calculate all possible hand ranks for a 5 card hand: response is stubbed

Project Structure

  • docs: project documentation lives in here.

  • src: production code lives in folder and is divided in the modules below:

    • app_poker: project package
      • api:
        • the API to the application lives in this module.
        • the current implementation is a REST API, but a gRPC, CLI API, etc would be implemented in here.
      • config:
        • configurable values live in here.
        • these are values such as Hand Ranks, Card Ranks.
          • as the system scales, you could migrate these into a database to allow independently changing config without restarting the application.
      • core:
        • the domain logic of the application lives in this module.
      • gateway:
        • all external interaction objects(e.g. files, external APIs etc) live in this module.
      • model:
        • the domain models for Poker live in this in this module.
      • app_poker.py: entry point to startup the application
  • tests: test code lives in folder. the tests are intentionally separated from production code.

  • utilities: any useful scripts, such as curl & postman requests, JSON payloads, software installations, etc.

Dependencies

Setup Instructions

Run Program

  • To start system run

    ./start_system.sh
  • Debugging

    • To run system in debug mode
      ./start_system_development.sh
    • Running in VSCode
      • open the "Run and Debug" view:
      • click the green play button.
        • the server will inform you the host and port in the terminal output at the bottom.
        • from here you debug like normal(i.e. add break points, step into code definitions, evaluate code snippets, etc) start system output

Testing

Git Conventions

Demo

0. start system output:

  • output: start system output

1. evaluate hand output:

  • request and response highest rank hand evaluation for Four of a Kind: four of a kind demo postman request
  • demo system state logs: four of a kind demo system state logs

Disclaimer: This is still work in progress.

About

A toy REST API driven Poker hand evaluator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors