1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//! # Example
//! ## Get legals moves and plays some random.
//! ```
//!     use crate::goban::rules::*;
//!     use crate::goban::rules::game::*;
//!     use rand::seq::IteratorRandom;
//!
//!     let mut g = Game::new(GobanSizes::Nine, Rule::Chinese);
//!       let mut i = 35;
//!        while !g.legals().count() != 0 && i != 0 {
//!            g.play(
//!                &g.legals().map(|coord| Move::Play(coord.0, coord.1))
//!                    .choose(&mut rand::thread_rng())
//!                    .unwrap());
//!            i -= 1;
//!            println!("{}", g.goban().pretty_string());
//!        }
//! ```

#[macro_use]
extern crate getset;

#[macro_use]
extern crate lazy_static;

pub mod pieces;
pub mod rules;