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

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 Encodable for Target

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl Decodable for Target

fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>

impl FromStr for Target

type Err = String

fn from_str(s: &str) -> Result<Self, String>

impl ToString for Target

fn to_string(&self) -> String

Derived Implementations

impl Debug for Target

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for Target

impl Clone for Target

fn clone(&self) -> Target

fn clone_from(&mut self, source: &Self)

impl PartialEq for Target

fn eq(&self, __arg_0: &Target) -> bool

fn ne(&self, __arg_0: &Target) -> bool