/*larry cashdollar tic tac toe for dave's hwk help. 11/7/2012*/ #include #include #include using namespace std; char board[3][3]; int game_won (char b[3][3]); void print_board (char b[3][3]); int main (void) { int x = 0, y = 0, p1, p2, turn = 1; char player; for (x = 0; x < 3; x++) { for (y = 0; y < 3; y++) { board[x][y] = '.'; } } while (1) { print_board (board); if (turn % 2) player = 'O'; else player = 'X'; cout << "############################\nTurn :"<< turn<>p1; cout <<"Enter an Y coordinate for player "<< player<>p2; if (board[p1][p2] == '.' && p1 <=2 && p1 >= 0 && p2 <= 2 && p2 >= 0) board[p1][p2] = player; turn++; if (game_won (board)) { print_board (board); cout <0)cout <<"|"; cout<