Giter VIP home page Giter VIP logo

texas_holdteam's Introduction

Poker Player (Rust)

Your task is to implement the best poker player logic! :)

Preparation

  1. Choose a team name (PokerPenguins?)
  2. Fork this repository
  3. Add the following secret:
    • TOKEN (value will be provided by the facilitator)
  4. Add the following variables:
    • NAMESPACE (value will be provided by the facilitator)
    • TEAMNAME (your team name - only lowercase letters, digits and dashes, must start with a lowercase letter)
  5. Run the main workflow in GitHub - it will be deployed automatically
  6. Notify the facilitator once you are done :)

How it works

Run it locally

cargo run

or

RUSTFLAGS="$RUSTFLAGS -A dead_code"
cargo build 
./target/debug/player-rust-rocket

Your player bot

Your application provides a single endpoint at the root path (/). This endpoint accepts a table object, which gives you an overview about the current state of the game. You will be able to see the other players and their bets. You can also see the community cards as well as your own cards. Using this information and given your current stack of chips, you have to decide how much you want to bet.

Poker game

If all players have successfully deployed their application and registered it with the game, the dealer service will start playing tournaments over and over. Each player has a starting stack of 100 chips. The blinds will start low but increase over time in each tournament. The player who wins the tournament receives 1 point on the total scoreboard. After that, the next tournament starts automatically.

Betting round

Each time a betting round starts, the dealer application will call the player bots one by one and retrieve their bets. This is a sample JSON of the table information provided to you:

{
  "activePlayer": 2,
  "communityCards": [
    {
      "rank": "10",
      "suit": "HEARTS"
    },
    {
      "rank": "5",
      "suit": "CLUBS"
    },
    {
      "rank": "A",
      "suit": "DIAMONDS"
    }
  ],
  "currentDealer" : 0,
  "minimumBet": 20,
  "minimumRaise": 40,
  "players": [
    {
      "name": "Bot1",
      "status": "ACTIVE",
      "stack": 990,
      "bet": 10
    },
    {
      "name": "Bot2",
      "status": "ACTIVE",
      "stack": 980,
      "bet": 20
    },
    {
      "name": "Bot3",
      "status": "ACTIVE",
      "stack": 1000,
      "bet": 0,
      "cards": [
        {
          "rank": "2",
          "suit": "HEARTS"
        },
        {
          "rank": "J",
          "suit": "CLUBS"
        }
      ]
    }
  ],
  "pot": 0,
  "round": 1,
  "smallBlind": 10
}

Start the game

Now it's your turn! Start implementing the Strategy function to do more than just fold every turn. Or rework the whole application. You can do what you want, as long as you provide the endpoint that is registered in the game. Have fun!

texas_holdteam's People

Contributors

betarayray avatar deisele avatar ds-jkreutzfeld avatar heinrian avatar imd0odo avatar kap4102 avatar structix avatar

Stargazers

 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.