#![allow(dead_code)]
#![allow(unused_mut)]
#![allow(unused_variables)]
#![allow(unused_parens)]
#![allow(non_snake_case)]
#![allow(warnings)]
use std::time::{ Duration, Instant };
extern crate cliclack;
extern crate comfy_table;
extern crate serde;
extern crate serde_json;
use cliclack::{ intro, outro };
use cliclack::select;
use comfy_table::Table;
mod deck;
mod _furniture;
mod _Medallion;
mod venue_distribution;
mod stages;
fn grid_01 () {
let mut table = Table::new();
table.set_header (vec![
"Header1",
"Header2",
"Header3"
])
.add_row (vec![
"This is a text",
"This is another text",
"This is the third text",
])
.add_row (vec![
"This is another text",
"Now\nadd some\nmulti line stuff",
"This is awesome",
]);
println!("{table}");
}
fn suggestions () -> Result<(&'static str, &'static str), Box<dyn std::error::Error>> {
intro ("create-my-app")?;
let mut stage = "";
let mut play = "";
stage = select ("Stage")
.item ("Venue", "Venue", "")
.item ("Flop", "Flop", "")
.item ("Turn", "Turn", "")
.item ("River", "River", "")
.interact()?;
if (stage == "Venue") {
play = select ("Play")
.item ("Venue :: 2 Leagued :: to 3 or 4", "Venue :: 2 Leagued :: to 3 or 4", "")
.item ("Venue :: 2 Teamed :: to exactly 5 Team", "Venue :: 2 Teamed :: to exactly 5 Team", "")
.item ("Venue :: 2 Teamed :: to exactly 5 Team", "Venue :: 2 Teamed :: to exactly 5 Team", "")
.interact()?;
}
if (stage == "Flop") {
play = select ("Play")
.item (
"Flop :: 4 Teamed :: to exactly 5 Team",
"Flop :: 4 Teamed :: to exactly 5 Team",
""
)
.item (
"Flop :: 4 Sequential :: to Straight",
"Flop :: 4 Sequential :: to Straight",
""
)
.interact()?;
}
outro ("You're all set!")?;
println!("You picked: {}", play);
Ok ((stage, play))
}
fn main () -> Result<(), Box<dyn std::error::Error>> {
let (stage, play) = suggestions()?;
let start = Instant::now ();
if (stage == "Venue") {
if (play == "Venue :: 2 Leagued :: to 3 or 4") {
stages::venue::pair::achieves_three_or_four_of_a_kind ();
}
if (play == "Venue :: 2 Teamed :: to exactly 5 Team") {
stages::venue::team_duet_to_quintet::play ();
}
if (play == "Venue :: 2 Different Leagues :: Both Pair") {
stages::venue::different::makes_two_pair_on_unpaired_desk ();
}
}
if (stage == "Flop") {
if (play == "Flop :: 4 Teamed :: to exactly 5 Team") {
stages::flop::four_jerseyed::makes_flush ();
}
if (play == "Flop :: 4 Sequential :: to Straight") {
stages::flop::four_sequential::makes_straight ();
}
}
let duration = start.elapsed ();
println! ("Duration: {:?}", duration);
Ok (())
}
fn main_v1 () {
return;
}