[position] Rever the const-ness of Position's initializers
Apparently you can't actually do that. :( You can't call trait methods in const contexts.
This commit is contained in:
parent
89802be53d
commit
d0abbd8f93
1 changed files with 2 additions and 2 deletions
|
@ -24,12 +24,12 @@ pub struct Position {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Position {
|
impl Position {
|
||||||
pub const fn empty() -> Position {
|
pub fn empty() -> Position {
|
||||||
Default::default()
|
Default::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a starting position.
|
/// Return a starting position.
|
||||||
pub const fn starting() -> Self {
|
pub fn starting() -> Self {
|
||||||
const BLACK_PIECES: [BitBoard; 6] = [
|
const BLACK_PIECES: [BitBoard; 6] = [
|
||||||
BitBoard::new(0b0000000011111111 << 48),
|
BitBoard::new(0b0000000011111111 << 48),
|
||||||
BitBoard::new(0b0100001000000000 << 48),
|
BitBoard::new(0b0100001000000000 << 48),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue