title: How to output players normally in the connect four game
body: <p>This is my board class</p>
  <pre><code>public class Board {
   char[][] grid;
   int width;
   int height;
   int count;
   char player;
  
  
  public Board(int height, int width){
  
      count = 0;
      grid = new char[height][width];
      this.width = width;
      this.height = height;
      for(int i = 0; i &lt; height; i++) {
          for(int j = 0; j &lt; width; j++){
              if(i == 0 &amp;&amp; j == 0){
                  
                  grid[i][j] = '┌';
              }
              else if(j % 2 == 1) {
                  grid[i][j] = '─';
              }
              else if (i == 0 &amp;&amp; j == width - 1){
                  grid[i][j] = '┐';
              }
              else if (i == height-1 &amp;&amp; j == 0){
              
                  grid[i][j] = '└';
              }
              else if (i == height - 1 &amp;&amp; j == width - 1){
                  grid[i][j] = '┘';
              }
              else if (i == 0){
                  grid[i][j] = '┬';
              }
              else if (j == 0){
          
                  grid[i][j] = '├';
              }
              else if (i == height - 1){
                  grid[i][j] = '┴';
              }
              else if (j == width - 1){
                  grid[i][j] = '┤';
              }
              else  
                  grid[i][j] = '┼';
          }
      }
  }
  
  public void print(){
      for(int i=0; i&lt;height; i++){
          for(int j=0; j&lt;width; j++)
              System.out.print(grid[i][j]);
              System.out.println();
      }
  }
  </code></pre>
  <p>Below is the put function of the board class. The problem is the put function. You must enter a line from the selectline function and have the player appear on the desired line.
  However, no matter how hard I modify the conditional statement, it only appears in the first line.
  How do I modify the conditional statement of the put function?</p>
  <pre><code>public void put(SelectLine setLine) {
  
      int y=setLine.getY();
      int x = grid.length-1;
      if(count%2 == 0) {
          player = '●';   
      }
      else {
          player = '○';
      }
      
              
          for(int i = grid.length-1; i &gt;=0; i--) {
                  if(grid[i][(y-1)*2] != player) {
                      grid[i][(y-1)*2] = player;
                      count++;
                      break;
                  }
              }
          
  
      System.out.println(&quot;────────&quot; + player + &quot;'s Turn ────────&quot;);
      this.print();       
      }
  }
  
  
  public class SelectLine {
  int line;
  public void input(){
      
      System.out.print(&quot;Select Line : &quot;);
      Scanner sc = new Scanner(System.in);
      line = sc.nextInt();
  
  }
  public int getY(){
      return line;
  
  }
  </code></pre>
  <p>}
  The goal is to keep stacking up like the picture below.
  <a href="https://i.stack.imgur.com/Pth6m.png" rel="nofollow noreferrer">enter image description here</a></p>