mancala 0.1.0

Play a variant of mancala
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Naive strategies, mainly for testing purposes.

use super::Strategy;
use crate::game::{Bowl, Position};

/// Pick the first option.
pub struct First {}

impl Strategy for First {
    fn play(&mut self, position: &Position) -> Option<Bowl> {
        let options = position.options();
        options.first().cloned()
    }
}