title: ConnectFour game in Java does not update board
body: <p>I am building a simple connect four game in java, however when I input a move and the board is printed again, it does not update the board. I have tried putting print statements and messing with the board to try to pinpoint where the disconnect is coming from, but cannot seem to find the issue. Any guidance would be appreciated.</p>
  <p>Heres my code:</p>
  <p>(I have 3 classes, excluding my main)</p>
  <p>Board Class:</p>
  <pre><code>private final int numberOfrows = 7;
  private final int numberOfcolumns = 15;
  String[][] board = new String[numberOfrows][numberOfcolumns];;
  
  public Board(){  
      this.board = display();
  }
  
  private String[][] display(){
  
       for (int i = 0;i &lt; board.length; i++)
       {    for (int j = 0;j&lt; board[i].length;j++)
          {
        if (j% 2 == 0) board[i][j] =&quot;|&quot;;
        else board[i][j] = &quot; &quot;;
        if (i == 6) board[i][j]= &quot;-&quot;;
       }
    
      }
      return board;
     
  }
  public void printBoard(){
      for (int i = 0;i &lt; board.length; i++)
      {
        for (int j = 0;j&lt; board[i].length; j++)
        {
          System.out.print(board[i][j]);
        }
        System.out.println();
      }
  }
  
  public void updateBoard(int move, String token){
      for (int i = 5; i &gt;= 0; i--){
          if (board[i][move].equals(&quot;&quot;)){
              board[i][move]=token;
              break;
          }
      }
  }
  public final void reset()
  {
      this.board = display();
      return;
  }
  public final boolean checkForwin(){
      //horizontal check
      for (int i = 0; i &lt; numberOfrows-1; i++){
          for (int y = 0; y &lt; numberOfrows; y+=2){
              if (!&quot; &quot;.equals(board[i][y+1]) &amp;&amp; board[i][y+1].equals(board[i][y+3]) &amp;&amp;
              board[i][y+3].equals(board[i][y+5]) &amp;&amp;
              board[i][y+5].equals(board[i][y+7])){
  
                  return true;}
          }
      }
      //vertical check
      for (int i = 1; i &lt; numberOfcolumns-3; i+=2){
          for (int y = 0; y &lt; numberOfrows-4; y++){
              if (!&quot; &quot;.equals(board[y][i]) &amp;&amp; board[y][i].equals(board[y+1][i]) &amp;&amp; 
              board[y+1][i].equals(board[y+2][i]) &amp;&amp;
              board[y+2][i].equals(board[y+3][i])){
                  
                  return true;}
              
          }
      }
      //ascending diagonal check
      for (int i = 0; i &lt; numberOfrows-4; i++){
          for (int y = 7; y &lt; numberOfrows; y+=2 ){
              if (!&quot; &quot;.equals(board[i][y]) &amp;&amp; board[i][y].equals(board[i+1][y-2]) &amp;&amp;
              board[i+1][y-2].equals(board[i+2][y-4]) &amp;&amp;
              board[i+2][y-4].equals(board[i+3][y-6])){
                 
                  return true;}
          }
      }
      //descending diagonal check
      for (int i = 0; i &lt; numberOfrows-4; i++){
          for (int y = 1; y &lt; numberOfcolumns-6; y+=2){
              if (!&quot; &quot;.equals(board[i][y]) &amp;&amp; board[i][y].equals(board[i+1][y+2]) &amp;&amp;
              board[i+1][y+2].equals(board[i+2][y+4]) &amp;&amp;
              board[i+2][y+4].equals(board[i+3][y+6])){
                 
                  return true;}
          }
      }
      return false;
  }
  </code></pre>
  <p>ConnectFour class:</p>
  <pre><code>   private String token1=&quot;R&quot;;
  private String token2=&quot;B&quot;;
  private boolean switchTurn=false;
  private Board board;
  private String winningColour;
  
  public ConnectFour(Board board){
      this.board = board;
  }
  public void playGame(HumanPlayer player1, HumanPlayer player2){
      board.reset();
      board.printBoard();
  
     while (!board.checkForwin()){
  
      if (switchTurn){
          board.updateBoard(player1.playerMove(), token1);
          switchTurn = false;
          board.printBoard();
         }
      else{
          //System.out.println(playmade2);
          board.updateBoard(player2.playerMove(), token2);
          switchTurn = true;
          board.printBoard();
      }
     }
     winningColour = switchTurn ? token1 : token2;
     System.out.println(&quot;End of game, player in &quot;+winningColour+&quot; has won!&quot;);
  
  }
  </code></pre>
  <p>HumanPlayer class:</p>
  <pre><code> private int row;
  
  protected int playerMove(){
      Scanner move = new Scanner(System.in);
      System.out.println(&quot;Enter move (0-6):&quot;);
  
      row = 2*move.nextInt()+1;
  
      return row;
  
  }
  </code></pre>
  <p>My runner class:</p>
  <pre><code> public static void main(String[] args) {
      Board board = new Board();
      ConnectFour game = new ConnectFour(board);
      HumanPlayer player1 = new HumanPlayer();
      HumanPlayer player2 = new HumanPlayer();
      game.playGame(player1, player2);
  }
  </code></pre>