Giter Club home page Giter Club logo

blackjack's Introduction

Blackjack

A Rust backend crate and command line frontend for the popular card game, Blackjack. This crate is designed to be compilable for linking with C.

Crate

This crate is available on crates.io.

The library provides data types for representing decks (specifically, multiple decks combined into a single deck), players, hands, and individual cards. These structs provide the necessary methods for implementing a simple game of Blackjack.

The Rust command line frontend provides a sample implementation as well as functional gameplay experience.

Linking with C

The repository includes a C header file indicating the exposed methods of the library. A command line frontend to the library written in C is also available. This can be compiled using the included Makefile. If the Rust library output is stored at a path other than project_root/target/debug, the references will have to be updated.

Licensing

Project available under GPLv3. See LICENSE for full license text.

blackjack's People

Contributors

arc676 avatar fatcat560 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blackjack's Issues

Not displaying the players' name

The name of the players are not displayed on my Windows 10 machine,
Anotación 2019-09-05 145559

The solution to this is deleting this line on the "main" file:
imagen

And on this line,
imagen

on the name parameter, add this methods .trim_end().to_string()

Excessive players can exhaust card supply

There are no validation checks for the size of the card supply. Theoretically, playing with 26 players and a single deck would mean that there won't be sufficient cards for all hands. While unlikely that such a scenario would arise, validation checks should probably be added.

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.