Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void moveX(){
- cout << "Please enter a column: ";
- cin >> col;
- cout << "Please enter a row: ";
- cin >> row;
- board[col][row] = 'X';
- cin.get();
- //check to see if col+1,row == X if true check if col+2,row == X if true x wins
- //check to see if col,row+1 == X if true check if col,row+2 == X if true X wins
- //check to see if col+1,row+1 == X if true check if col+2,row+2 == X if true X wins
- //continue to check every direction without leaving the grid space
- //do the same for O
- }
- void moveO(){
- cout << "Please enter a column: ";
- cin >> col;
- cout << "Please enter a row: ";
- cin >> row;
- board[col][row] = 'O';
- cin.get();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement