1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
#include <iostream> using namespace std; // global variables char board[6][7] ={}; //placeinto() places char x into col of b[][] array void placeinto(char b[6][7], char x, int col){ bool placed = false; for(int j = 5; j>=0 && !placed; j--){ if(b[j][col] == '_') { b[j][col] = x; placed = true; } } return; } /* //Checks horizontal wins bool hwin(){ for(int r=0; r<6; r++){ for (int c=0; c<7;c++){ if ((board [r][c] == 'X'||board [r][c] == 'O')&& board[r][c] == board[r+1][c]&& board[r][c+1] == board[r+2][c]&& board[r][c+2] == board[r+3][c]&& board[r][c+3] == board[r+4][c]&& board[r][c+4] == board[r+5][c]&& board[r][c+5] == board[r+6][c]&& board[r][c+6] == board[r+7][c]&& ) return true; } } return false; } bool dwin(){ for (int r=0; r<6; r++){ for (int c=0; c<7;c++){ if((board [r][c] == 'X'||board [r][c] == 'O')&& board } */ int drop(char c, int col){ } int main() { cout<<"C O N N E C T 4"<<endl; // assigning '_'s for (int r=0; r<6; r++){ for(int c=0; c<7;c++){ board[r][c] = '_'; } } //printing for(int i=0; i<6; i++){ for(int j=0; j<7; j++) cout << board[i][j] <<" "; cout << endl; } for(int j=1; j<=7; j++) cout << j << " "; }