Skip to content

Commit 1402ea0

Browse files
Daniel WhiteDaniel White
authored andcommitted
Moved black pawn setup code into for loop to save 1 byte.
1 parent dd6a985 commit 1402ea0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

iota.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ main(i) {
7373
i=D(H, 0, 0, E),
7474
printf("bestmove %c%i%c%i%c\n", X%16+97, X/16+1, Y%16+97, Y/16+1, i?32:98)
7575
Z"p",1)) { // Parse 'position' command.
76-
F ;i<8;) // Reset board to start position.
76+
F ;i<8;B[i+++96]=202) // Reset board to start position.
7777
B[i]=(B[i+112]=T[i+23])-(S=32), // Pieces.
7878
B[i+S]=B[i+48]=B[i+64]=B[i+80]=0, // Empty rows.
79-
B[i+16]=E=170,B[i+++96]=202 // Pawns.
79+
B[i+16]=E=170 // White pawns.
8080
F ;C=strtok(0," ");)
8181
D(*C+C[1]*16-881, C[2]+C[3]*16-881, C[4], E);
8282
}

0 commit comments

Comments
 (0)