ceelo-core 0.1.5

Logic for the 'Cee-Lo' Dice Game
Documentation


# About

Core logic for the Cee-Lo Dice Game


# Usage

After having added the crate to your project, use the `play_until_winner` function with a `Vec<(Player, PlayerData)>>` as argument. See the below example.

    use ceelo_core::{Player, PlayerData};
    
    fn main() {
        let starting_amount = 400;
        let players = vec![
            // John bets 100 each time
            ("John", PlayerData::new(100, starting_amount)),
            ("Jane", PlayerData::new(200, starting_amount)),
            // Adds a console player
            ("You", PlayerData::new(WagerConsole), starting_amount),
        ];
        println!("Congrats {} for winning!", play_until_winner(players).0.0);
    
    }