pub struct TricksTable(pub [TricksRow; 5]);Expand description
Tricks that each seat can take as declarer for all strains
Tuple Fields§
§0: [TricksRow; 5]Implementations§
Source§impl TricksTable
impl TricksTable
Sourcepub fn hex(self, seat: Seat, strains: impl AsRef<[Strain]>) -> impl UpperHex
pub fn hex(self, seat: Seat, strains: impl AsRef<[Strain]>) -> impl UpperHex
Hexadecimal representation from a seat’s perspective
Examples found in repository?
examples/compute-hot-deals/main.rs (line 69)
51fn main() -> Result<ExitCode, solver::Error> {
52 let deals = match std::env::args().nth(1) {
53 Some(string) => {
54 if let Ok(n) = string.parse::<usize>() {
55 n
56 } else {
57 eprintln!("{}", include_str!("README.md"));
58 return Ok(ExitCode::FAILURE);
59 }
60 }
61 None => 1,
62 };
63
64 for _ in 0..deals {
65 let (deal, tricks) = compute_deal(&mut rand::rng())?;
66 println!(
67 "{} {:X}",
68 deal.display(Seat::North),
69 tricks.hex(Seat::North, Strain::SYS)
70 );
71 }
72
73 Ok(ExitCode::SUCCESS)
74}Trait Implementations§
Source§impl Clone for TricksTable
impl Clone for TricksTable
Source§fn clone(&self) -> TricksTable
fn clone(&self) -> TricksTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TricksTable
impl Debug for TricksTable
Source§impl From<TricksTable> for ddTableResults
impl From<TricksTable> for ddTableResults
Source§fn from(table: TricksTable) -> Self
fn from(table: TricksTable) -> Self
Converts to this type from the input type.
Source§impl From<ddTableResults> for TricksTable
impl From<ddTableResults> for TricksTable
Source§fn from(table: ddTableResults) -> Self
fn from(table: ddTableResults) -> Self
Converts to this type from the input type.
Source§impl Hash for TricksTable
impl Hash for TricksTable
Source§impl Index<Strain> for TricksTable
impl Index<Strain> for TricksTable
Source§impl PartialEq for TricksTable
impl PartialEq for TricksTable
impl Copy for TricksTable
impl Eq for TricksTable
impl StructuralPartialEq for TricksTable
Auto Trait Implementations§
impl Freeze for TricksTable
impl RefUnwindSafe for TricksTable
impl Send for TricksTable
impl Sync for TricksTable
impl Unpin for TricksTable
impl UnwindSafe for TricksTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more