From da8d704b499c3b1ff3bcfbefc11dd2a97ca9f190 Mon Sep 17 00:00:00 2001 From: AnthonyMichaelTDM <68485672+AnthonyMichaelTDM@users.noreply.github.com> Date: Fri, 25 Feb 2022 22:51:47 -0800 Subject: [PATCH] todo list --- 10_Blackjack/rust/src/main.rs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/10_Blackjack/rust/src/main.rs b/10_Blackjack/rust/src/main.rs index 8db2a0b3..8ad4cac3 100644 --- a/10_Blackjack/rust/src/main.rs +++ b/10_Blackjack/rust/src/main.rs @@ -1,6 +1,19 @@ use rand::{Rng, prelude::thread_rng}; use std::{io}; +/** + * todo list: + * + * make a 2 player game functional + * + * add more players + * + * use a 3 deck pool of cards instead of an infinite amount + * + * keep track of player bets + */ + + //DATA struct CARD { name: String, @@ -24,6 +37,12 @@ struct DECK { } struct PLAYER { hand: HAND, + balance: usize, +} +impl PLAYER { + fn new() -> PLAYER { + + } } struct GAME { @@ -35,7 +54,7 @@ struct GAME { discard_pile: DECK, } impl GAME { - fn start(num_players:u8) { + fn start(num_players:u8) -> GAME { //ask user how many players there should be, not including them let num_players = loop { //input loop @@ -59,6 +78,12 @@ impl GAME { }; + + + //return a game + return GAME { human_player: PLAYER::new(), computer_players: (), dealer: (), deck: (), discard_pile: () } + + } }