fixup
This commit is contained in:
3
chess.c
3
chess.c
@@ -6,6 +6,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#define E 0 /* empty */
|
||||
#define K 1 /* king */
|
||||
#define Q 2 /* queen */
|
||||
@@ -23,6 +24,7 @@ void print_board(int* board);
|
||||
void init_board(int* board);
|
||||
void do_turn(int turn_no, int* board);
|
||||
|
||||
|
||||
/*
|
||||
* main
|
||||
*/
|
||||
@@ -196,7 +198,6 @@ int get_piece(char *str){
|
||||
}
|
||||
|
||||
if(x != -1 && y != -1){
|
||||
printf("%i", 8*(8-y) + x);
|
||||
return 8*(7-y) + x;
|
||||
}else{
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user