#include #include #include "playerlib.h" char enemyc = 0; char getEnemyChar(char c) { char enemyc; switch(c) { case 'X': enemyc='O'; break; case 'O': enemyc='X'; break; } return enemyc; } int readStateBuffer(char *stateBuffer, struct cell (*gameField)[fieldWidth]) { for(size_t row=0; row< fieldHeight; ++row) { for(size_t col=0; col< fieldWidth; ++col) { int index = row*fieldHeight+col+1; gameField[row][col].content = stateBuffer[index]; //printf("gameField %lu %lu =stateBuffer %d = %c\n", row, col, index, gameField[row][col].content); } } return 0; }