+/// Try to coordinate to give the next player a momentum opportunity.
+#[must_use]
+pub fn coordinating_player(mut fallback: Player) -> Player {
+ Player(Box::new(move |game: &Game| -> Play {
+ if let Some(card) = game
+ .current_player_hand()
+ .filter_by_suits(&game.next_player_hand().suits())
+ .random()
+ {
+ return Play::Play(*card);
+ }
+ fallback.0(game)
+ }))
+}
+