- int compute_index(Square wksq, Square bksq, Square psq, Color stm);
+ int compute_index(Square wksq, Square bksq, Square wpsq, Color stm);
+}
+
+
+int probe_kpk_bitbase(Square wksq, Square wpsq, Square bksq, Color stm) {
+
+ int index = compute_index(wksq, bksq, wpsq, stm);
+
+ return KPKBitbase[index / 8] & (1 << (index & 7));