File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,4 @@ pfkpk: pfkpk.c kpk.c kpk.h
88test :
99 ./pfkpk
1010
11- clean :
12- rm -f * .o
13-
1411# vi: noexpandtab
Original file line number Diff line number Diff line change @@ -9,14 +9,21 @@ the file `LICENSE' for details.
99This implementation is quite fast because it handles the 64 possible
1010black king locations superposition in all operations.
1111
12+ ```
13+ kpkGenerate CPU time [seconds]: 0.001579
14+ kpkTable size [bytes]: 32768
15+ kpkSelfCheck: OK
16+ kpkProbe 24/24: OK
17+ ```
18+
1219The implementation is agnostic to board geometry. See the file
1320`kpk.h' for instructions on how to adapt to an alternative square
1421indexing.
1522
1623Distance to conversion (DTC) is not provided, but is trivial to
1724add. Please contact the author if you need advice.
1825
19- Marcel van Kervinck
26+ Marcel
2027
2128```
2229/*
Original file line number Diff line number Diff line change @@ -103,7 +103,6 @@ int kpkGenerate(void)
103103{
104104 uint64_t valid [64 * 32 ];
105105
106- // Prepare won
107106 for (int ix = 0 ; ix < arrayLen (kpkTable [0 ]); ix ++ ) {
108107 int wK = wKsquare (ix ), wP = wPsquare (ix );
109108
@@ -115,6 +114,7 @@ int kpkGenerate(void)
115114 kpkTable [black ][ix ] = lost ;
116115 }
117116
117+ // Valid positions after black move, pawn capture allowed
118118 valid [ix ] = ~king64 (bit (wK ));
119119 if (file (wP ) != fileA ) valid [ix ] &= ~bit (wP + N + W );
120120 if (file (wP ) != fileH ) valid [ix ] &= ~bit (wP + N + E );
You can’t perform that action at this time.
0 commit comments