Re: Programming chess engine
Posted: Wed Aug 27, 2014 6:13 pm
The header file conio.h is a non-standard header file.
However, it is not needed anyway. Just comment it out.
However, it is not needed anyway. Just comment it out.
Independent Computer Chess Discussion Forum
https://open-chess.org/
Code: Select all
Documents/firstchess.c: In function ‘int Eval()’:
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
unsigned char value_piece[6] = {VALUE_PAWN, VALUE_KNIGHT, VALUE_BISHOP, VALUE_ROOK, VALUE_QUEEN, VALUE_KING};
^
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c: In function ‘void ComputerThink(unsigned char)’:
Documents/firstchess.c:616:48: warning: large integer implicitly truncated to unsigned type [-Woverflow]
score = Search(-MATE, MATE, max_depth, &mm3);
^
Documents/firstchess.c:616:48: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c: At global scope:
Documents/firstchess.c:661:23: error: ‘::main’ must return ‘int’
void main()
^
Documents/firstchess.c: In function ‘int main()’:
Documents/firstchess.c:687:30: error: too many arguments to function ‘int MakeMove()’
MakeMove(bestMove);
^
Documents/firstchess.c:497:13: note: declared here
static int MakeMove()
^
Documents/firstchess.c:697:30: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[256]’ [-Wformat=]
sscanf (buf, "%s", &s);
^
Documents/firstchess.c:714:13: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
return;
^
Code: Select all
Documents/firstchess.c: In function ‘int Eval()’:
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
unsigned char value_piece[6] = {VALUE_PAWN, VALUE_KNIGHT, VALUE_BISHOP, VALUE_ROOK, VALUE_QUEEN, VALUE_KING};
^
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c:313:124: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c: In function ‘void ComputerThink(unsigned char)’:
Documents/firstchess.c:616:48: warning: large integer implicitly truncated to unsigned type [-Woverflow]
score = Search(-MATE, MATE, max_depth, &mm3);
^
Documents/firstchess.c:616:48: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Documents/firstchess.c: In function ‘int main()’:
Documents/firstchess.c:687:30: error: too many arguments to function ‘int MakeMove()’
MakeMove(bestMove);
^
Documents/firstchess.c:497:13: note: declared here
static int MakeMove()
^
Documents/firstchess.c:697:30: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘char (*)[256]’ [-Wformat=]
sscanf (buf, "%s", &s);
^
Documents/firstchess.c:714:13: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
return;
^