@@ -1489,32 +1489,32 @@ const fn create_symetry_maps() -> SymmetryMaps {
14891489 in which they are calculated in COMPUTE_FULL_PRIMARY_HASH()
14901490 and COMPUTE_FULL_SECONDARY_HASH().
14911491*/
1492- unsafe fn init_symmetry_maps ( ) {
1493- symmetry_map [ 0 ] = & SYMMENTRY_MAPS . b1_b1_map ;
1494- inv_symmetry_map [ 0 ] = & SYMMENTRY_MAPS . b1_b1_map ;
1495- symmetry_map [ 1 ] = & SYMMENTRY_MAPS . b8_b1_map ;
1496- inv_symmetry_map [ 1 ] = & SYMMENTRY_MAPS . b8_b1_map ;
1497- symmetry_map [ 2 ] = & SYMMENTRY_MAPS . a2_b1_map ;
1498- inv_symmetry_map [ 2 ] = & SYMMENTRY_MAPS . a2_b1_map ;
1499- symmetry_map [ 3 ] = & SYMMENTRY_MAPS . h2_b1_map ;
1500- inv_symmetry_map [ 3 ] = & SYMMENTRY_MAPS . a7_b1_map ;
1501- symmetry_map [ 4 ] = & SYMMENTRY_MAPS . g1_b1_map ;
1502- inv_symmetry_map [ 4 ] = & SYMMENTRY_MAPS . g1_b1_map ;
1503- symmetry_map [ 5 ] = & SYMMENTRY_MAPS . g8_b1_map ;
1504- inv_symmetry_map [ 5 ] = & SYMMENTRY_MAPS . g8_b1_map ;
1505- symmetry_map [ 6 ] = & SYMMENTRY_MAPS . a7_b1_map ;
1506- inv_symmetry_map [ 6 ] = & SYMMENTRY_MAPS . h2_b1_map ;
1507- symmetry_map [ 7 ] = & SYMMENTRY_MAPS . h7_b1_map ;
1508- inv_symmetry_map [ 7 ] = & SYMMENTRY_MAPS . h7_b1_map ;
1492+ fn init_symmetry_maps ( symmetry_map_ : & mut [ & [ i32 ] ; 8 ] , inv_symmetry_map_ : & mut [ & [ i32 ] ; 8 ] ) {
1493+ symmetry_map_ [ 0 ] = & SYMMENTRY_MAPS . b1_b1_map ;
1494+ inv_symmetry_map_ [ 0 ] = & SYMMENTRY_MAPS . b1_b1_map ;
1495+ symmetry_map_ [ 1 ] = & SYMMENTRY_MAPS . b8_b1_map ;
1496+ inv_symmetry_map_ [ 1 ] = & SYMMENTRY_MAPS . b8_b1_map ;
1497+ symmetry_map_ [ 2 ] = & SYMMENTRY_MAPS . a2_b1_map ;
1498+ inv_symmetry_map_ [ 2 ] = & SYMMENTRY_MAPS . a2_b1_map ;
1499+ symmetry_map_ [ 3 ] = & SYMMENTRY_MAPS . h2_b1_map ;
1500+ inv_symmetry_map_ [ 3 ] = & SYMMENTRY_MAPS . a7_b1_map ;
1501+ symmetry_map_ [ 4 ] = & SYMMENTRY_MAPS . g1_b1_map ;
1502+ inv_symmetry_map_ [ 4 ] = & SYMMENTRY_MAPS . g1_b1_map ;
1503+ symmetry_map_ [ 5 ] = & SYMMENTRY_MAPS . g8_b1_map ;
1504+ inv_symmetry_map_ [ 5 ] = & SYMMENTRY_MAPS . g8_b1_map ;
1505+ symmetry_map_ [ 6 ] = & SYMMENTRY_MAPS . a7_b1_map ;
1506+ inv_symmetry_map_ [ 6 ] = & SYMMENTRY_MAPS . h2_b1_map ;
1507+ symmetry_map_ [ 7 ] = & SYMMENTRY_MAPS . h7_b1_map ;
1508+ inv_symmetry_map_ [ 7 ] = & SYMMENTRY_MAPS . h7_b1_map ;
15091509 let mut i = 0 ;
15101510 while i < 8 {
15111511 let mut j = 1 ;
15121512 while j <= 8 {
15131513 let mut k = 1 ;
15141514 while k <= 8 {
15151515 let pos = 10 * j + k;
1516- if * inv_symmetry_map [ i as usize ] . offset ( * symmetry_map [ i as usize ] . offset ( pos as isize ) as isize ) != pos {
1517- let to_report = * inv_symmetry_map [ i as usize ] . offset ( * symmetry_map [ i as usize ] . offset ( pos as isize ) as isize ) ;
1516+ if * inv_symmetry_map_ [ i as usize ] . offset ( * symmetry_map_ [ i as usize ] . offset ( pos as isize ) as isize ) != pos {
1517+ let to_report = * inv_symmetry_map_ [ i as usize ] . offset ( * symmetry_map_ [ i as usize ] . offset ( pos as isize ) as isize ) ;
15181518 LibcFatalError :: error_in_map_thor ( i, pos, to_report) ;
15191519 }
15201520 k += 1
@@ -1899,7 +1899,7 @@ pub unsafe fn init_thor_database(random: &mut MyRandom) {
18991899 thor_games_sorted = 0 ;
19001900 thor_games_filtered = 0 ;
19011901 init_move_masks ( ) ;
1902- init_symmetry_maps ( ) ;
1902+ init_symmetry_maps ( & mut symmetry_map , & mut inv_symmetry_map ) ;
19031903 thor_hash. init_thor_hash ( random) ;
19041904 prepare_thor_board ( & mut board. board ) ;
19051905 build_thor_opening_tree ( & mut board, & mut thor_hash, & mut thor_opening_tree) ;
0 commit comments