change repetitionTable memory allocation place
This commit is contained in:
@ -23,8 +23,10 @@ uint_least8_t getRank(const uint_least8_t field) {
|
||||
return field / BOARD_SIZE;
|
||||
}
|
||||
|
||||
struct zobristTable initZobirstTable(size_t length) {
|
||||
struct zobristTableElement *table = calloc(length, sizeof *table);
|
||||
struct zobristTable initZobirstTable(struct zobristTableElement *table, size_t length) {
|
||||
for(size_t i = 0; i < length; ++i) {
|
||||
table[i].hash = 0;
|
||||
}
|
||||
return (struct zobristTable){table, length};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user