Skip to content

Commit dd6a985

Browse files
Daniel WhiteDaniel White
authored andcommitted
Moved code which handles 'go' command above 'position' code to save a single semicolon.
1 parent 166ce91 commit dd6a985

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iota.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ main(i) {
6969
F ;strtok(gets(c)," ");fflush(i=0)) { // Loop, grabbing input and flushing output.
7070
Z"uci",4)) puts("id name i\nid author D\nuciok") // Reply to 'uci'.
7171
Z"i",1)) puts("readyok") // Reply to 'isready'.
72+
Z"g",1)) // Go command. Make a move and print it.
73+
i=D(H, 0, 0, E),
74+
printf("bestmove %c%i%c%i%c\n", X%16+97, X/16+1, Y%16+97, Y/16+1, i?32:98)
7275
Z"p",1)) { // Parse 'position' command.
7376
F ;i<8;) // Reset board to start position.
7477
B[i]=(B[i+112]=T[i+23])-(S=32), // Pieces.
@@ -77,8 +80,5 @@ main(i) {
7780
F ;C=strtok(0," ");)
7881
D(*C+C[1]*16-881, C[2]+C[3]*16-881, C[4], E);
7982
}
80-
Z"g",1)) // Go command. Make a move and print it.
81-
i=D(H, 0, 0, E),
82-
printf("bestmove %c%i%c%i%c\n", X%16+97, X/16+1, Y%16+97, Y/16+1, i?32:98);
8383
}
8484
}

0 commit comments

Comments
 (0)