Rename movegen module files and make readability improvements

This commit is contained in:
stefiosif
2024-09-15 11:25:22 +03:00
parent 062a2fe903
commit 6badbcd776
12 changed files with 57 additions and 51 deletions

View File

@@ -2,13 +2,14 @@ use crate::{board::board::Board, movegen::r#move::Move};
// Rows: Aggressors (P, N, B, R, Q, K)
// Columns: Victims (K, Q, R, B, N, P)
#[rustfmt::skip]
const MVV_LVA: [[usize; 6]; 6] = [
[30, 29, 28, 27, 26, 00],
[25, 24, 23, 22, 21, 00],
[20, 19, 18, 17, 16, 00],
[15, 14, 13, 12, 11, 00],
[10, 09, 08, 07, 06, 00],
[05, 04, 03, 02, 01, 00],
[30, 29, 28, 27, 26, 0],
[25, 24, 23, 22, 21, 0],
[20, 19, 18, 17, 16, 0],
[15, 14, 13, 12, 11, 0],
[10, 9, 8, 7, 6, 0],
[5, 4, 3, 2, 1, 0],
];
pub fn score_by_mvv_lva(board: &Board, mv: Move) -> usize {