Removed some commented-out lines💥
This commit is contained in:
@ -120,10 +120,6 @@ const CARD_DATA_JSON: &str = include_str!("cards.json");
|
||||
|
||||
pub fn new() -> GameState {
|
||||
let parsed_cards: Vec<CardInfo> = serde_json::from_str(CARD_DATA_JSON).unwrap();
|
||||
/*let card_map = parsed_cards
|
||||
.into_iter()
|
||||
.map(|card| (card.id, card))
|
||||
.collect::<HashMap<_, _>>();*/
|
||||
let starting_player = match random_bool(0.5) {
|
||||
true => Player::A,
|
||||
_ => Player::B,
|
||||
@ -297,7 +293,6 @@ pub fn bounce(game_state: &mut GameState, play_id: Uuid) {
|
||||
}
|
||||
|
||||
pub fn tap(game_state: &mut GameState, play_id: Uuid) {
|
||||
//let played_card = game_state.play.remove(&play_id).unwrap();
|
||||
game_state.events.push(CountedEvent {
|
||||
id: game_state.events.len(),
|
||||
event: Event::Tap(play_id.clone()),
|
||||
@ -420,8 +415,5 @@ pub fn get_deck(game_state: &mut GameState, player: Player) -> String {
|
||||
event: Event::ViewDeck(player),
|
||||
});
|
||||
let deck_copy = game_state.deck.clone();
|
||||
//let copy_slice = deck_copy.make_contiguous();
|
||||
//copy_slice.sort();
|
||||
/*let final_card_list = copy_slice.into_iter().map(|card| card.braced().to_string()).collect::<Vec<String>>();*/
|
||||
serde_json::to_string(&deck_copy).unwrap()
|
||||
}
|
||||
|
||||
@ -497,8 +497,6 @@ struct PlayerUuids {
|
||||
#[launch]
|
||||
fn rocket() -> _ {
|
||||
let game_state = game::new();
|
||||
//game::draw(&mut game_state, 7, Player::A);
|
||||
//game::draw(&mut game_state, 7, Player::B);
|
||||
let game_state_arc = Arc::new(Mutex::new(game_state));
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
|
||||
Reference in New Issue
Block a user