Tictactoe C++ Code
Tictactoe C++ Code
Tictactoe C++ Code
int main()
{
char* pMove = ¤tMove;
*pMove = currentMove;
DisplayBoard(board, 3);
GrabInput('1');
cout<<*pMove<<endl;
system("pause");
UpdateBoard(board, 3, '1', *pMove);
PrintBoard(board, 3, *pMove);
GrabInput(2);
UpdateBoard(board, 3, 2, currentMove);
PrintBoard(board, 3, currentMove);
system("pause");
return 0;
}
if (player == '1')
{
cout<<"\n";
cout<<"Your Move:\n\n";
cout<<"Player 1 (1-9): ";
cin>>player1;
//currentPlayer = player1;
*pMove = currentMove = player1;
}
if (player == '2')
{
cout<<"\n";
cout<<"Your Move:\n\n";
cout<<"Player 2 (1-9): ";
cin>>player2;
//currentPlayer = player2;
*pMove = currentMove = player2;
}
}
}
cout<<endl;
}
cout<<endl;
}