[−][src]Module games::blackjack
BlackJack Your typical BlackJack game
use games::blackjack::{BlackJack, GameState}; let mut bj = BlackJack::new(None); // Only use 1 deck, use `BlackJack::new(5)` for 5 decks bj.player_hit().is_ok(); // Make a move // Game can be frozen with `bj.freeze()`; // And can be dethawed with `BlackJack::Dethaw` match bj.finish() { GameState::PlayerWon => println!("You win!"), GameState::PlayerLost => println!("You lose!"), _ => unreachable!(), }
Modules
errors | Errors for blackjack |
Structs
BlackJack | BlackJack Game |
Enums
GameState | A struct to represent the games state |