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 30 31 32 33 34 35 36 37 38 39 40 41 42 43
//! # Rust Gobblet Library
//! This is a library for management Gobblet game.
//!
//! ## Example
//! This places black piece on B2 and white piece on C3 from hands.
//!
//! ```
//! use gobblet::{Action, Color, Game, Piece, Size, Square};
//!
//! let mut game = Game::new();
//!
//! assert_eq!(game.turn(), Color::Black);
//! game.execute(Action::PlaceFromHand {index: 0, to: Square::B2});
//! assert_eq!(game.turn(), Color::White);
//! game.execute(Action::PlaceFromHand {index: 0, to: Square::C3});
//!
//! assert_eq!(game.board().get_top(Square::B2), Some(Piece::new(Color::Black, Size::Big)));
//! assert_eq!(game.board().get_top(Square::C3), Some(Piece::new(Color::White, Size::Big)));
//! ```
mod bitboard;
pub use crate::bitboard::*;
mod board;
pub use crate::board::*;
mod color;
pub use crate::color::*;
mod error;
pub use crate::error::*;
mod game;
pub use crate::game::*;
mod hand;
pub use crate::hand::*;
mod piece;
pub use crate::piece::*;
mod square;
pub use crate::square::*;