Dillinger4
Jul 30th, 2000, 08:38 PM
does any one know how i might go about doing this.
it's a simple tictactoe game but when the game board
function is called the values seem to be passed
to the first element of the array. so if this is
my game board -> _|_|_ only the first space on the
_|_|_
| |
game board is always updated.
int main(int argc, char* argv[])
{
cout << "Player 1 enter your cordinates:
cin >> tictactoe[x1][y1];
gameboard();
return 0;
}
void gameboard()
{
cout << endl;
cout << setw(5) << tictactoe[0][0] << setw(4) << tictactoe[0][1] << setw(4) << tictactoe[0][2] << endl;
}
it's a simple tictactoe game but when the game board
function is called the values seem to be passed
to the first element of the array. so if this is
my game board -> _|_|_ only the first space on the
_|_|_
| |
game board is always updated.
int main(int argc, char* argv[])
{
cout << "Player 1 enter your cordinates:
cin >> tictactoe[x1][y1];
gameboard();
return 0;
}
void gameboard()
{
cout << endl;
cout << setw(5) << tictactoe[0][0] << setw(4) << tictactoe[0][1] << setw(4) << tictactoe[0][2] << endl;
}