Advertisement
Guest User

Untitled

a guest
Feb 26th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1.  
  2. void moveX(){
  3. cout << "Please enter a column: ";
  4. cin >> col;
  5.  
  6. cout << "Please enter a row: ";
  7. cin >> row;
  8.  
  9. board[col][row] = 'X';
  10. cin.get();
  11.  
  12. //check to see if col+1,row == X if true check if col+2,row == X if true x wins
  13. //check to see if col,row+1 == X if true check if col,row+2 == X if true X wins
  14. //check to see if col+1,row+1 == X if true check if col+2,row+2 == X if true X wins
  15. //continue to check every direction without leaving the grid space
  16. //do the same for O
  17. }
  18.  
  19. void moveO(){
  20. cout << "Please enter a column: ";
  21. cin >> col;
  22.  
  23. cout << "Please enter a row: ";
  24. cin >> row;
  25.  
  26. board[col][row] = 'O';
  27. cin.get();
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement