more things public
This commit is contained in:
parent
ad1b591a06
commit
7d6d9269f5
2 changed files with 10 additions and 10 deletions
18
src/board.rs
18
src/board.rs
|
|
@ -3,9 +3,9 @@
|
|||
use crate::bitboard::*;
|
||||
|
||||
macro_rules! container {
|
||||
($a:ident, $b:ident, $n:literal) => {
|
||||
($v:vis, $a:ident, $b:ident, $n:literal) => {
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub(crate) struct $b<T>(pub(crate) [T; $n]);
|
||||
$v struct $b<T>(pub(crate) [T; $n]);
|
||||
#[allow(unused)]
|
||||
impl<T> $b<T> {
|
||||
#[inline]
|
||||
|
|
@ -38,7 +38,7 @@ pub enum Color {
|
|||
Black,
|
||||
}
|
||||
|
||||
container!(Color, ByColor, 2);
|
||||
container!(pub, Color, ByColor, 2);
|
||||
|
||||
impl Color {
|
||||
#[inline]
|
||||
|
|
@ -96,7 +96,7 @@ pub enum File {
|
|||
H,
|
||||
}
|
||||
|
||||
container!(File, ByFile, 8);
|
||||
container!(pub(crate), File, ByFile, 8);
|
||||
|
||||
impl File {
|
||||
#[inline]
|
||||
|
|
@ -168,7 +168,7 @@ pub enum Rank {
|
|||
Eighth,
|
||||
}
|
||||
|
||||
container!(Rank, ByRank, 8);
|
||||
container!(pub(crate), Rank, ByRank, 8);
|
||||
|
||||
impl Rank {
|
||||
#[inline]
|
||||
|
|
@ -246,7 +246,7 @@ pub enum Square{
|
|||
A8, B8, C8, D8, E8, F8, G8, H8,
|
||||
}
|
||||
|
||||
container!(Square, BySquare, 64);
|
||||
container!(pub(crate), Square, BySquare, 64);
|
||||
|
||||
impl Square {
|
||||
#[inline]
|
||||
|
|
@ -515,7 +515,7 @@ impl Role {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct ByRole<T>(pub(crate) [T; 6]);
|
||||
pub struct ByRole<T>(pub(crate) [T; 6]);
|
||||
#[allow(unused)]
|
||||
impl<T> ByRole<T> {
|
||||
#[inline]
|
||||
|
|
@ -587,7 +587,7 @@ pub(crate) enum Direction {
|
|||
West,
|
||||
}
|
||||
|
||||
container!(Direction, ByDirection, 8);
|
||||
container!(pub(crate), Direction, ByDirection, 8);
|
||||
|
||||
impl Direction {
|
||||
#[inline]
|
||||
|
|
@ -638,7 +638,7 @@ pub enum CastlingSide {
|
|||
Long,
|
||||
}
|
||||
|
||||
container!(CastlingSide, ByCastlingSide, 2);
|
||||
container!(pub(crate), CastlingSide, ByCastlingSide, 2);
|
||||
|
||||
impl CastlingSide {
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ impl Setup {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn bitboards(&self) -> ByColor<ByRole<Bitboard>> {
|
||||
pub fn bitboards(&self) -> ByColor<ByRole<Bitboard>> {
|
||||
let Self {
|
||||
w,
|
||||
p_b_q,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue