Function spades::get_trick_winner [−][src]
pub fn get_trick_winner(index: usize, others: &[Card; 4]) -> usize
Given four cards and a starting card, returns the winner of a trick.
The rules used to determine the winner of a trick are as follows:
- Spades trump all other suits
- The suit the first player (given by index) plays sets the suit of the trick
- The highest ranking spades card or card of suit of first player's card wins the trick.