simplify PosMap + BoardValueMap logic
This commit is contained in:
@@ -20,7 +20,6 @@ impl BoardValueMap {
|
||||
|
||||
/// Weights from: https://repub.eur.nl/pub/7142/ei2005-47.pdf
|
||||
pub fn new() -> Self {
|
||||
let mut map = PosMap::new();
|
||||
assert_eq!(
|
||||
Board::BOARD_SIZE,
|
||||
8,
|
||||
@@ -37,11 +36,6 @@ impl BoardValueMap {
|
||||
[-20, -50, -2, -2, -2, -2, -50, -20],
|
||||
[100, -20, 10, 5, 5, 10, -20, 100],
|
||||
];
|
||||
|
||||
for (i, j) in Board::all_positions() {
|
||||
map.set(i, j, POSITION_VALUES[i as usize][j as usize])
|
||||
}
|
||||
|
||||
Self(map)
|
||||
Self(PosMap::from(POSITION_VALUES))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user