Trying to remove tilde files again
[arrocco.git] / main.c
blob6d69d9b6a70731f3717324085682d2bd499d6b86
1 /* main.c
2 2 Mar 2007 */
4 #include "all.c"
6 static Position * pos;
7 static Position children[20 * 512];
9 int main(int argc, char *argv[])
11 int offswitch, d, c, n, i;
12 Int64 nodeCount;
14 pos = malloc(sizeof(Position));
15 newPosition(pos);
17 int pieceArrangement[8] = {ROOK, KNIGHT, BISHOP, QUEEN,
18 KING, BISHOP, KNIGHT, ROOK};
19 for (c = 0; c < 8; c++){
20 setPieceAt(pos, 1 * 8 + c, WHITE(PAWN));
21 setPieceAt(pos, 6 * 8 + c, BLACK(PAWN));
22 setPieceAt(pos, c, WHITE(pieceArrangement[c]));
23 setPieceAt(pos, 7 * 8 + c, BLACK(pieceArrangement[c]));
26 for (d = 0; d <= 9; d++){
27 nodeCount = 0ULL;
28 offswitch = 0;
29 int value = alphaBeta(pos, children, d, -7777777, 7777777,
30 &nodeCount, &offswitch);
31 printf("%2d %4d %llu\n", d, value, nodeCount);
34 return 0;