title: Thread.sleep method changes desired outcome
body: <p>I have some code here for a project. It works as expected BEFORE implementing the sleep method. Then when I add sleep, it does not show the desired outcome.</p>
  
  <p>I am new to java and not really experienced in using the sleep method.</p>
  
  <pre class="lang-java prettyprint-override"><code>import java.util.Scanner;
  
  public class Driver2 {
  
      public static void main(String[] args) 
      {    
          //initialize variables for user input on sleep and generations.
          long t;
          double gen;
          Scanner input = new Scanner (System.in);
  
          System.out.print("Enter the length of time between generations: ");
          t = input.nextLong();
  
          System.out.print("Enter the number of generations: ");
          gen = input.nextDouble();
  
          // Create a new GamOfLife object
          GameOfLife g = new GameOfLife();
          char[][] tempBoard = new char[g.getRows()][g.getColumns()];
          // Inialize tempBoard to be all 0 
          for(int d = 0; d &lt; g.getRows(); d++)
          {
              for(int j = 0; j &lt; g.getColumns(); j++)
                  tempBoard[d][j] = '0';          
          }
  
          // Set board in GameOfLife instance
          g.setGameBoard(tempBoard);
          // Set initial pattern 
          g.putGlider();
          // Print the gameboard with the initial patter
          g.printGameBoard();
  
          // 100 Generations
          for (int i = 0; i &lt; gen; i++)
          {
              /* Create a temporary board that represents the next generation of cells
                 Cannot change the gameboard directly because it will change the 
                 number of surrounding neighbors of the cell next to it. */ 
              for(int d = 0; d &lt; g.getRows(); d++)
              {
                  for(int j = 0; j &lt; g.getColumns(); j++)
                      tempBoard[d][j] = '0';          
              }
  
              for (int r = 0; r &lt; g.getRows();r++)
              {
                  for (int c = 0; c &lt; g.getColumns(); c++)
                  {
                      // Cell is dead and has 3 neighbors (alive in next generation)
                      if (g.deadOrAlive(r, c) == false &amp;&amp; g.getNeighbors(r, c) == 3)
                          tempBoard[r][c] = '1';
                      // Cell is alive and has 2 or 3 neighbors (remains alive for next generation)
                      else if (g.deadOrAlive(r, c) &amp;&amp; ((g.getNeighbors(r, c) == 3 || g.getNeighbors(r, c) == 2)))
                          tempBoard[r][c] = '1';
                      // all other cases the cell dies
                      else
                          tempBoard[r][c] = '0';
                  }
              }
              System.out.println("Generation " + (i + 1));
              // Set the new gameboard as the tempboard all at once after checking the conditions for each dimenison
              try {
                  Thread.sleep(t);
              }
              catch (InterruptedException ex)
              {
  
              g.setGameBoard(tempBoard);
              }
              g.printGameBoard();
  
          }
      }
  }
  </code></pre>
  
  <p>What is supposed to happen is, the glider (or shape if you will) moves along a gameboard that I have set up. It works perfectly, however I need to slow down execution between each generation. Then when I implement the sleep method, the glider doesn't move at all.</p>