GithubHelp home page GithubHelp logo

raymon-roos / blackjack-cli-rust Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 9 KB

Blackjack for the cli, written in Rust!

License: BSD 3-Clause "New" or "Revised" License

Rust 100.00%
blackjack-cli coding-kata rust

blackjack-cli-rust's Introduction

This is a simplified version of Blackjack, written in Rust

Why does this exist

Because I enjoyed doing this in PHP, and I enjoyed learning about Rust, so I wanted try making something I'm familiar with, in a language I'm not yet experienced at.

What it does

So far, nothing but run tests, as I slowly work on figuring out how to structure a Rust project, and implementing features. This project is far from a priority, so it won't progress very quickly.

A big difference I already noticed is, unlike in PHP, Rust function arguments can have only one type, meaning I'll have to create additional functions if I want similar behaviour for multiple types.

Planned features

  • Adding up to 7 players.
  • Players take turns drawing cards (hitting or standing).
  • Placing bets, and winning or losing “money”.
  • Player are presented their score and gains/losses at the end of the game.
  • Splitting hands.
  • Doubling down.
  • Ace counting as either 1 or 11.

Features it doesn't have

  • Multiplayer over a network
  • Placing “insurance” bets
  • Surrendering

How to use it

Run cargo run from the root of this project, and follow the on-screen instructions.

Design considerations

So far, I'm just exploring how to work with Rust. Apart from being inspired by my PHP implementation, I haven't made any cohesive design decisions yet.

blackjack-cli-rust's People

Stargazers

 avatar

Watchers

 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.