system(\); print(); for (i = 0; i < chessboard_size; i++) { for (j = 0; j < chessboard_size; j++) { if (chessboard[i][j] == 1) { playercount1++; } else if (chessboard[i][j] == 2) { playercount2++; } } } printf(\, playercount1); printf(\, playercount2); if (playercount1 > playercount2) { printf(\); } else if (playercount1 < playercount2) { printf(\); } else { printf(\); } return 1; }
return 0; }
Othello otl;
void gamestart() {
otl.init();
while (!otl.gameover()) { system(\); otl.print();
if (otl.skip()) { continue; } else { otl.input(); } } }
int main(int argc, char* argv[]) {
char ch = 'y'; while (1) { gamestart(); getchar(); printf(\); ch = getchar(); if (ch == 'n') { break; } }
return 0; }