Hey everyone, i am a newbie here to this forum. i have been working on a connect 4 as a school project and i am stuck; here is my code below so far can anyone help me out of this? thanks

import java.util.Scanner;

// This Program is used to design a game called Connect Four.

//this game has seven columns and six rows.

// the balls are two different colored RED and YELLOW.

// the balls can be any way possible straight, diagonal, vertical but anyhow four in a row

//

public class ConnectFour

{

static char [][] board= new char [6][7];

public static void main(String[] args)

{

Scanner input= new Scanner(System.in);

System.out.println("Welcome to Connect Four. ");// display message

System.out.println("Player 1 is RED and Player 2 is YELLOW. ");

int r= 0;// rows

int c= 0;//columns

short totalTurns = 0;// number of turns

char pCol;// Player color

//making a loop to make sure the number of turns given to players are less than 42

for (totalTurns = 0; totalTurns < 42; totalTurns++);

{ char Red = 0;

char Yellow = 0;

if (totalTurns %2 == 0)

pCol = Red;//red

else

pCol = Yellow;//yellow

// method for dropping a piece into a given- column

// dropping chips in the board

int availrow =0;

int col=-1;

while( col<0||col>6)

{

System.out.println("Enter the column ___ ");

col= input.nextInt();

if (board[5][col]==' ') availrow=5;

else if (board[4][col]==' ') availrow=4;

else if (board[3][col]==' ') availrow=3;

else if (board[2][col]==' ') availrow=2;

else if (board[1][col]==' ') availrow=1;

else if (board[0][col]==' ') availrow=0;

else

{ System.out.println("Invalid Column, Try Again. ");

}

col=-1;

displayBoard();// to call back board which is a main method and make sure the board is being displayed.

board[availrow][col] = 0;

}

{

while(totalTurns < 42){

if(winHorizontal() || winVertical() || windiagRight() || windiagLeft()){

System.out.println("Congratulations You win");

break;

}

}

}

}

}

// display the board

// make methods for displaying the board

public static void displayBoard()

{ System.out.println (" 0 1 2 3 4 5 6 ");

System.out.println("--------------");

for (int r=0;r<6;r++)

{

for (int c=0;c<7;c++)

{

System.out.print("|"+ board [r][c]);

}

System.out.println("|");

}

}

// make method for checking the board to see if there's a winning four ion a row pattern

// A horizontal win can start in any given row but but can only start in columns 0,1,2 or 3

// starting from any potential point, are are in the same color and aren't blank.

// all the possibilities are checked and NOT found four in column return false else return true.

public static boolean winHorizontal()

{

boolean winHorizontal = false;

for (int r=0; r<6;r++)// every row

{

for (int c=0;c<=3;c++)// columns 0-3 inclusive

{

if (board [r][c]==board [r][c+1]&&

board [r][c]==board [r][c+2]&&

board [r][c]==board [r][c+3]&&

board [r][c] !=' ') winHorizontal = true;

}

}

return winHorizontal;

}

// A vertical win can start in ANY column, but can only start in

// rows 0, 1, 2, or 3. From each potential starting point, see

// if the cell, plus the three below it, are all the same color

// and that the color isn't blank (i.e., must be red or yellow)

// If so, return true. If we've checked all possibilities and

// NOT found four in a row, return false.

//

public static boolean winVertical()

{

boolean winVertical = false;

for (int c=0; c<7; c++)// every column

{

for (int r=0; r<=3; r++)// rows 0-3 inclusive

{

if (board [r][c] == board [r+1][c] &&

board [r][c] == board [r+2][c] &&

board [r][c] == board [r+3][c] &&

board[r][c] != ' ') winVertical = true;

}

}

return winVertical;

}

// A diagonal right win can start in some particular rows and columns.

// since

public static boolean windiagRight()

{

boolean windiagRight =false;

for (int r=0 ;r<3 ; r++)// rows from 0-3

{

for (int c=0; c<6; c++)// columns 0-6

{

if(board [r][c] == board [r+1] [c+1] &&

board [r][c] == board [r+2][c+2] &&

board [r][c] == board [r+3][c+3] &&

board[r][c] != ' ') windiagRight =true;

}

}

return windiagRight;

}

//check diagonal left

public static boolean windiagLeft()

{

boolean windiagLeft =false;

for (int r=0 ;r>3 ; r++)

{

for (int c=3; c<7; c++)

{

if(board [r][c] == board [r+1] [c-1] &&

board [r][c] == board [r+2][c-2] &&

board [r][c] == board [r+3][c-3] &&

board[r][c] != ' ') windiagLeft =true;

}

}

return windiagLeft;

}

}