Colocación de discos correctos Conecte el juego de Four Java con el panel de dibujo

Estoy tratando de hacer un juego Connect Four en Java usando la entrada del usuario y el panel de dibujo. Dos personas apagan los turnos escribiendo la columna en la que quieren que entre su pieza. Estoy teniendo problemas para que los discos ya colocados permanezcan en el tablero el próximo turno (porque cada vez aparece un nuevo panel de dibujo con el tablero actualizado) (intentamos usar la GUI pero fallamos). También tengo problemas para apagar los giros y hacer que el color cambie cada vez. Muchas gracias, esto es lo que tengo hasta ahora.

import java.util.*;
import java.awt.*;

public class ConnectFour{
   public static void main(String[] args){
      Scanner console = new Scanner(System.in);
      char [][] board = new char [7][6];
      for (int i = 0; i< 7; i++){
         for (int j= 0; j< 6; j++){
            board[i][j] = ' '; 
         }
      }
      boolean isBlack = true ; //black discs turn
      boolean isRed = false ;   //red discs turn
      boolean playersTurn = true ;
      while (playersTurn){
         if (isBlack == true ){
            System.out.println("Black's Turn");
         }
         else {
            System.out.println("Red's Turn");
         }
         System.out.print("Choose a column to place your disk (1-7): ");

         int column = console.nextInt()-1;
         if (column < 0 || column > 7) { //while loop?
            System.out.print( "Column needs to be within 1-7"); //try catch?
         }

         drawBoard(column, board, isBlack, isRed);
         // connectedFour(board);
         // playersTurn = !playersTurn;
      }
      // isBlack = !isBlack; INVERT WHOSE TURN IT IS!!! unreachable statement??
   }

   public static void drawBoard(int column, char [][] board, boolean isBlack, boolean isRed) {
      DrawingPanel panel = new DrawingPanel(550,550);
      int rowAvailable;
      Graphics g = panel.getGraphics();
      g.drawLine(0,0,0,500);
      g.drawLine(0,0,500,0);
      g.drawLine(500,0,500,427);
      g.drawLine(0,427,500,427);

      for (int i = 0; i< 6; i++){
         for (int j= 0; j<= 6; j++){
            g.setColor(Color.YELLOW);
            g.fillRect(j*71,i*71,71,71);
            g.setColor(Color.WHITE);
            g.fillOval(j*71,i*71,71,71);
         }
      }

      int x = 0;
      int row = 5;

      while (board[column][row-x] != ' '){
         x++;
      }

      row = 5-x;

      if (isBlack == true) {
         g.setColor(Color.BLACK);  
         board[column][row-x] = 'b';                                                
      }                                                   
      else {
         g.setColor(Color.RED);
         board[column][row-x] = 'r';
      }
        // I KNOW THIS FOR LOOP DOES NOT WORK SUCCESSFULLY    
      for (int i = 0; i< 6; i++){                               
         for (int j= 0; j<= 6; j++){
            if(board[i][j] != 'b'){
               g.fillOval((i * 71),j*71, 71,71);
            }
         }
      }



         //       g.fillOval((column * 71),row*71, 71,71); //number 142 is just a test
                     //board[i][j] = WHOSE TURN IT IS (to update array)
          //  if(isBlack){
          //     board[column][row] = 'b';
         //   }
         //   else{
         //      board[column][row] = 'r';
          //  }
   }

   //get whose turn it is as parameter?? a color string? boolean?
   public static boolean  connectedFour( char[][] board){
      int verticalCount = 0;
      for (int i = 0; i< 6; i++){ //goes down each column //EXCEPTION HERE BECAUSE 0
         for( int j=0; j<=6; j++){
            if (board[i][j]== board[i-1][j]){
               verticalCount ++;
            }
         }
      }

      int horizontalCount = 0;
      for (int i =0; i<=6; i++){
         for (int j =0; j<6; j++){
            if (board[i][j-1] == board[i][j]){
               horizontalCount++;
            }
         }
      }

      int diagonalCount = 0;
      //get diagonal here
      if (verticalCount >= 4 || horizontalCount >= 4|| diagonalCount >=4){
         return true ; //return who the winner is. String?
      //
      }
      else {
         return false ;
      }
   }
}

Respuestas a la pregunta(1)

Su respuesta a la pregunta