diff --git a/Cargo.toml b/Cargo.toml index a5661d8..7542226 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,6 @@ members = [ "board", "chess_bitboard", - "chess_core", + "chessfriend_core", "explorer", ] diff --git a/bitboard/Cargo.toml b/bitboard/Cargo.toml index 0670e94..e565de3 100644 --- a/bitboard/Cargo.toml +++ b/bitboard/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -core = { path = "../core" } +chessfriend_core = { path = "../core" } diff --git a/bitboard/src/bitboard.rs b/bitboard/src/bitboard.rs index 730c7c2..5be905a 100644 --- a/bitboard/src/bitboard.rs +++ b/bitboard/src/bitboard.rs @@ -2,7 +2,7 @@ use crate::library::{library, FILES, RANKS}; use crate::LeadingBitScanner; -use chess_core::{Direction, Square}; +use chessfriend_core::{Direction, Square}; use std::fmt; use std::ops::Not; diff --git a/bitboard/src/lib.rs b/bitboard/src/lib.rs index d3c0c4b..6b0703e 100644 --- a/bitboard/src/lib.rs +++ b/bitboard/src/lib.rs @@ -12,7 +12,7 @@ pub(crate) use bitboard::{BitBoard, BitBoardBuilder}; macro_rules! bitboard { ($($sq:ident),* $(,)?) => { $crate::bitboard::BitBoardBuilder::empty() - $(.square(chess_core::Square::$sq))* + $(.square(chessfriend_core::Square::$sq))* .build() }; } diff --git a/bitboard/src/library.rs b/bitboard/src/library.rs index 1e6a84d..506d6cd 100644 --- a/bitboard/src/library.rs +++ b/bitboard/src/library.rs @@ -1,7 +1,7 @@ // Eryn Wells use super::BitBoard; -use chess_core::{Direction, Square}; +use chessfriend_core::{Direction, Square}; use std::sync::Once; pub(super) const RANKS: [BitBoard; 8] = [ diff --git a/board/Cargo.toml b/board/Cargo.toml index da7df3c..2f8727d 100644 --- a/board/Cargo.toml +++ b/board/Cargo.toml @@ -6,4 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -chess_core = { path = "../chess_core" } +chessfriend_core = { path = "../core" } diff --git a/board/src/fen.rs b/board/src/fen.rs index be63610..8610f00 100644 --- a/board/src/fen.rs +++ b/board/src/fen.rs @@ -5,7 +5,7 @@ use crate::{ r#move::Castle, Color, Position, }; -use chess_core::{File, Rank, Square}; +use chessfriend_core::{File, Rank, Square}; use std::fmt::Write; #[derive(Clone, Copy, Debug, Eq, PartialEq)] diff --git a/board/src/macros.rs b/board/src/macros.rs index ad69496..c6c374c 100644 --- a/board/src/macros.rs +++ b/board/src/macros.rs @@ -6,7 +6,7 @@ macro_rules! piece { $crate::piece::Piece::new($crate::piece::Color::$color, $crate::piece::Shape::$shape) }; ($color:ident $shape:ident on $square:ident) => { - $crate::piece::PlacedPiece::new(piece!($color $shape), chess_core::Square::$square) + $crate::piece::PlacedPiece::new(piece!($color $shape), chessfriend_core::Square::$square) } } diff --git a/board/src/move.rs b/board/src/move.rs index c593b56..7b3e55c 100644 --- a/board/src/move.rs +++ b/board/src/move.rs @@ -1,7 +1,7 @@ // Eryn Wells use crate::piece::{Piece, PlacedPiece, Shape}; -use chess_core::{Rank, Square}; +use chessfriend_core::{Rank, Square}; use std::fmt; pub use castle::Castle; @@ -18,7 +18,7 @@ pub enum MakeMoveError { mod castle { use crate::Color; - use chess_core::Square; + use chessfriend_core::Square; #[repr(u16)] #[derive(Copy, Clone, Debug, Eq, PartialEq)] @@ -419,8 +419,8 @@ mod move_formatter { $crate::piece::Color::$color, $crate::piece::Shape::$shape, ), - chess_core::Square::$from_square, - chess_core::Square::$to_square, + chessfriend_core::Square::$from_square, + chessfriend_core::Square::$to_square, ) .build() }; @@ -430,15 +430,15 @@ mod move_formatter { $crate::piece::Color::$color, $crate::piece::Shape::$shape, ), - chess_core::Square::$from_square, - chess_core::Square::$to_square, + chessfriend_core::Square::$from_square, + chessfriend_core::Square::$to_square, ) .capturing($crate::piece::PlacedPiece::new( $crate::piece::Piece::new( $crate::piece::Color::$captured_color, $crate::piece::Shape::$captured_shape, ), - chess_core::Square::$to_square, + chessfriend_core::Square::$to_square, )) .build() }; diff --git a/board/src/move_generator/bishop.rs b/board/src/move_generator/bishop.rs index 7bad274..cd259f7 100644 --- a/board/src/move_generator/bishop.rs +++ b/board/src/move_generator/bishop.rs @@ -5,7 +5,7 @@ use crate::{ piece::{Color, Piece, PlacedPiece}, BitBoard, MoveBuilder, Position, }; -use chess_core::Direction; +use chessfriend_core::Direction; move_generator_declaration!(ClassicalMoveGenerator); diff --git a/board/src/move_generator/queen.rs b/board/src/move_generator/queen.rs index 10ad498..f012d8c 100644 --- a/board/src/move_generator/queen.rs +++ b/board/src/move_generator/queen.rs @@ -5,7 +5,7 @@ use crate::{ piece::{Color, Piece, PlacedPiece}, BitBoard, MoveBuilder, Position, }; -use chess_core::Direction; +use chessfriend_core::Direction; move_generator_declaration!(ClassicalMoveGenerator); diff --git a/board/src/move_generator/rook.rs b/board/src/move_generator/rook.rs index 8ee6acd..c6dbb7b 100644 --- a/board/src/move_generator/rook.rs +++ b/board/src/move_generator/rook.rs @@ -5,7 +5,7 @@ use crate::{ piece::{Color, Piece, PlacedPiece}, BitBoard, MoveBuilder, Position, }; -use chess_core::Direction; +use chessfriend_core::Direction; move_generator_declaration!(ClassicalMoveGenerator); @@ -63,7 +63,7 @@ impl<'pos> MoveGeneratorInternal for ClassicalMoveGenerator<'pos> { mod tests { use super::*; use crate::{piece::Piece, position, position::DiagramFormatter, BitBoard, Color, Position}; - use chess_core::Square; + use chessfriend_core::Square; #[test] fn classical_single_rook_bitboard() { diff --git a/board/src/piece.rs b/board/src/piece.rs index cc91765..b80d1da 100644 --- a/board/src/piece.rs +++ b/board/src/piece.rs @@ -1,7 +1,7 @@ // Eryn Wells use crate::display::{ASCIIDisplay, FENDisplay, UnicodeDisplay}; -use chess_core::Square; +use chessfriend_core::Square; use std::fmt; use std::slice::Iter; diff --git a/board/src/position/builders/move_builder.rs b/board/src/position/builders/move_builder.rs index 2146e9d..17eb36d 100644 --- a/board/src/position/builders/move_builder.rs +++ b/board/src/position/builders/move_builder.rs @@ -6,7 +6,7 @@ use crate::{ r#move::Castle, BitBoard, Color, MakeMoveError, Move, Piece, Position, }; -use chess_core::{Direction, Square}; +use chessfriend_core::{Direction, Square}; /// A position builder that builds a new position by making a move. #[derive(Clone)] diff --git a/board/src/position/builders/position_builder.rs b/board/src/position/builders/position_builder.rs index 0410ca3..0866094 100644 --- a/board/src/position/builders/position_builder.rs +++ b/board/src/position/builders/position_builder.rs @@ -7,8 +7,8 @@ use crate::{ r#move::Castle, BitBoard, Color, MakeMoveError, Move, Piece, Position, }; -use chess_core::{Rank, Square}; use std::collections::BTreeMap; +use chessfriend_core::Square; #[derive(Clone)] pub struct Builder { diff --git a/board/src/position/diagram_formatter.rs b/board/src/position/diagram_formatter.rs index ff4c3cf..0c46de4 100644 --- a/board/src/position/diagram_formatter.rs +++ b/board/src/position/diagram_formatter.rs @@ -1,7 +1,7 @@ // Eryn Wells use crate::Position; -use chess_core::{File, Rank, Square}; +use chessfriend_core::{File, Rank, Square}; use std::fmt; pub struct DiagramFormatter<'a>(&'a Position); diff --git a/board/src/position/piece_sets.rs b/board/src/position/piece_sets.rs index fa08c84..856a3e8 100644 --- a/board/src/position/piece_sets.rs +++ b/board/src/position/piece_sets.rs @@ -4,7 +4,7 @@ use crate::{ piece::{Piece, PlacedPiece}, BitBoard, Color, }; -use chess_core::Square; +use chessfriend_core::Square; #[derive(Debug, Eq, PartialEq)] pub enum PlacePieceStrategy { diff --git a/board/src/position/pieces.rs b/board/src/position/pieces.rs index 4e4495d..959a9da 100644 --- a/board/src/position/pieces.rs +++ b/board/src/position/pieces.rs @@ -3,7 +3,7 @@ use super::Position; use crate::piece::{Color, Piece, PlacedPiece, Shape}; use crate::BitBoard; -use chess_core::Square; +use chessfriend_core::Square; pub struct Pieces<'a> { color: Color, diff --git a/board/src/position/position.rs b/board/src/position/position.rs index ebc2948..e1f2f92 100644 --- a/board/src/position/position.rs +++ b/board/src/position/position.rs @@ -9,7 +9,7 @@ use crate::{ sight::Sight, BitBoard, Move, }; -use chess_core::Square; +use chessfriend_core::Square; use std::{cell::OnceCell, fmt}; #[derive(Clone, Debug, Eq, PartialEq)] @@ -268,7 +268,7 @@ impl fmt::Display for Position { #[cfg(test)] mod tests { use crate::{position, Castle, Color, Position}; - use chess_core::Square; + use chessfriend_core::Square; #[test] fn piece_on_square() { diff --git a/board/src/sight.rs b/board/src/sight.rs index 7763bac..92b295f 100644 --- a/board/src/sight.rs +++ b/board/src/sight.rs @@ -4,7 +4,7 @@ use crate::{ piece::{Color, PlacedPiece, Shape}, BitBoard, Position, }; -use chess_core::Direction; +use chessfriend_core::Direction; pub(crate) trait Sight { fn sight_in_position(&self, position: &Position) -> BitBoard; @@ -175,7 +175,7 @@ mod tests { mod pawn { use crate::{sight::Sight, BitBoard}; - use chess_core::Square; + use chessfriend_core::Square; sight_test!(e4_pawn, piece!(White Pawn on E4), bitboard!(D5, F5)); diff --git a/core/Cargo.toml b/core/Cargo.toml index 9b8c272..9b33128 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "chess_core" +name = "chessfriend_core" version = "0.1.0" edition = "2021"