Enum libcoinche::bid::Target
[−]
[src]
pub enum Target { Contract80, Contract90, Contract100, Contract110, Contract120, Contract130, Contract140, Contract150, Contract160, ContractCapot, }
Goal set by a contract.
Determines the winning conditions and the score on success.
Variants
Contract80
Team must get 80 points
Contract90
Team must get 90 points
Contract100
Team must get 100 points
Contract110
Team must get 110 points
Contract120
Team must get 120 points
Contract130
Team must get 130 points
Contract140
Team must get 140 points
Contract150
Team must get 150 points
Contract160
Team must get 160 points
ContractCapot
Team must win all tricks
Methods
impl Target
[src]
fn score(&self) -> i32
Returns the score this target would give on success.
fn to_str(&self) -> &'static str
fn victory(&self, points: i32, capot: bool) -> bool
Determines whether this target was reached.
Trait Implementations
impl PartialEq for Target
[src]
fn eq(&self, __arg_0: &Target) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Clone for Target
[src]
fn clone(&self) -> Target
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Target
[src]
impl Debug for Target
[src]
impl FromStr for Target
[src]
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, String>
Parses a string s
to return a value of this type. Read more