Skip to content

Commit

Permalink
chore: BitBoard erasure gahhh
Browse files Browse the repository at this point in the history
  • Loading branch information
raklaptudirm committed Jan 15, 2025
1 parent 2f51908 commit 4bad193
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion games/src/games/ataxx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ pub struct Position {

impl PositionType for Position {
type Square = Square;
type BitBoard = BitBoard;
type ColoredPiece = ColoredPiece;
type Move = Move;

Expand Down
1 change: 0 additions & 1 deletion games/src/games/chess/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub struct Position {

impl PositionType for Position {
type Square = Square;
type BitBoard = BitBoard;
type ColoredPiece = ColoredPiece;
type Move = Move;

Expand Down
1 change: 0 additions & 1 deletion games/src/games/isolation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub struct Position {

impl PositionType for Position {
type Square = Square;
type BitBoard = BitBoard;
type ColoredPiece = ColoredPiece;
type Move = Move;

Expand Down
1 change: 0 additions & 1 deletion games/src/interface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub use r#move::*;
pub use set::*;
pub use square::*;

pub type BitBoard<P> = <P as PositionType>::BitBoard;
pub type Square<P> = <P as PositionType>::Square;
pub type File<P> = <Square<P> as SquareType>::File;
pub type Rank<P> = <Square<P> as SquareType>::Rank;
Expand Down
7 changes: 1 addition & 6 deletions games/src/interface/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use std::fmt::Display;
use std::str::FromStr;

use super::{
BitBoardType, Color, ColoredPieceType, Hash, MoveList, MoveStore, MoveType,
SquareType,
Color, ColoredPieceType, Hash, MoveList, MoveStore, MoveType, SquareType,
};

/// Position is a generalized interface for board representations of a wide
Expand All @@ -12,15 +11,11 @@ use super::{
/// custom ones can also be implemented by the library user.
pub trait PositionType: FromStr + Display
where
Self::BitBoard: BitBoardType,
Self::ColoredPiece: ColoredPieceType,
Self::Move: MoveType,
{
type Square: SquareType;

/// Type for the bitboards used by this board representation.
type BitBoard;

/// Type for the pieces (with color) used by this board representation.
type ColoredPiece;

Expand Down

0 comments on commit 4bad193

Please sign in to comment.