pub fn score(&self) -> Option<Score> {
        if self.finished() {
            let mut first: Stones = self.bowls[0..self.size].iter().cloned().sum();
            first += self.capture[0];
            let mut second: Stones = self.bowls[self.size..2 * self.size].iter().cloned().sum();
            second += self.capture[1];

            let score = first as Score - second as Score;
            Some(score)
        } else {
            None
        }
    }
/// Determine the score after the game is finished.
///
/// Scores are awarded to the current player. Positive scores are a win, negative scores are a loss.
Determine the score after the game is finished.
Scores are awarded to the current player. Positive scores are a win, negative scores are a loss.
Determine the score after the game is finished . Scores are awarded to the current player . Positive scores are a win negative scores are a loss .
pub fn score(&self) -> Option<Score> {
        if self.finished() {
            let mut first: Stones = self.bowls[0..self.size].iter().cloned().sum();
            first += self.capture[0];
            let mut second: Stones = self.bowls[self.size..2 * self.size].iter().cloned().sum();
            second += self.capture[1];
            let score = first as Score - second as Score;
            Some(score)
        } else {
            None
        }
    }
pub fn score ( & self ) -> Option < Score > { if self . finished ( ) { let mut first : Stones = self . bowls [ 0 .. self . size ] . iter ( ) . cloned ( ) . sum ( ) ; first += self . capture [ 0 ] ; let mut second : Stones = self . bowls [ self . size .. 2 * self . size ] . iter ( ) . cloned ( ) . sum ( ) ; second += self . capture [ 1 ] ; let score = first as Score - second as Score ; Some ( score ) } else { None } }
Determine the score after the game is finished.
Determine the score after the game is finished .
&self
&self