Function twentyone::cards::draw_card[][src]

pub fn draw_card(deck: &mut Vec<[char; 2]>) -> Result<[char; 2], ()>

Returns the first card from a deck or shoe, then removes it

Arguments

  • deck - The deck or shoe to draw from

Examples

use twentyone::cards;
let mut deck = cards::create_deck();
let card = cards::draw_card(&mut deck);