[board] Reorganize bitboard and position modules and export some symbols from the crate
Move position.rs to the position module and create a mod.rs. Do the same for bitboard.rs in the bitboard modules. Export Color, Piece, Position, and Square and use crate::Thing directly instead of referring to the symbol in the nested modules.
This commit is contained in:
parent
d2d33a4915
commit
758a3d95fc
7 changed files with 32 additions and 18 deletions
|
@ -1,10 +1,9 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
use super::Position;
|
||||
use crate::bitboard::BitBoard;
|
||||
use crate::piece::{Color, Piece, PlacedPiece, Shape};
|
||||
use crate::position::Position;
|
||||
use crate::square::Square;
|
||||
use std::collections::HashSet;
|
||||
use crate::Square;
|
||||
|
||||
pub struct Pieces<'a> {
|
||||
color: Color,
|
||||
|
@ -89,8 +88,9 @@ impl<'a> Iterator for Pieces<'a> {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use crate::piece::{Color, Piece, Shape};
|
||||
use crate::position::Position;
|
||||
use crate::square::Square;
|
||||
use crate::Position;
|
||||
use crate::Square;
|
||||
use std::collections::HashSet;
|
||||
|
||||
fn square_at(sq: &str) -> Square {
|
||||
Square::from_algebraic_string(sq).expect(sq)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue