title: Reverse loop TicTacToe
body: <p>I've got loop:</p>
  <pre><code>for (int i = 0; i&lt;3; i++){
    System.out.println(i);
  }
  
  output:
  0
  1
  2
  </code></pre>
  <p>I need to reverse this loop to output:</p>
  <pre><code>2
  1
  0
  </code></pre>
  <p>I need it because I work on TicTacToe Java game.</p>
  <p>Here is my code for check win:</p>
  <pre><code> static boolean checkWin(char dot) {
          for (int i = 0; i &lt; map.length; i++) {
              for (int j = 0; j &lt; map[i].length; j++) {
                  if (map[0][i] == dot &amp;&amp; i == 2) {
                      return true;
                  }
                  if (map[1][i] == dot &amp;&amp; i == 2) {
                      return true;
                  }
  
                  if (map[2][i] == dot &amp;&amp; i == 2) {
                      return true;
                  }
                  if (map[i][0] == dot &amp;&amp; i == 2) {
                      return true;
                  }
                  if (map[i][1] == dot &amp;&amp; i == 2) {
                      return true;
                  }
                  if (map[i][2] == dot &amp;&amp; i == 2) {
                      return true;
                  }
                  if (map[i][i] == dot &amp;&amp; i == 2) {
                      return true;
                  }
                  if (map[i][0] == dot &amp;&amp; i == 2) {
                      return true;
                  }
              }
  
          }
          return false;
      }
  </code></pre>
  <p>last thing that I need to refactor this method:</p>
  <pre><code>  static boolean checkWin(char dot) {
          if (map[0][0] == dot &amp;&amp; map[0][1] == dot &amp;&amp; map[0][2] == dot) {
              return true;
          }
          if (map[1][0] == dot &amp;&amp; map[1][1] == dot &amp;&amp; map[1][2] == dot) {
              return true;
          }
          if (map[2][0] == dot &amp;&amp; map[2][1] == dot &amp;&amp; map[2][2] == dot) {
              return true;
          }
  
          if (map[0][0] == dot &amp;&amp; map[1][0] == dot &amp;&amp; map[2][0] == dot) {
              return true;
          }
          if (map[0][1] == dot &amp;&amp; map[1][1] == dot &amp;&amp; map[2][1] == dot) {
              return true;
          }
          if (map[0][2] == dot &amp;&amp; map[1][2] == dot &amp;&amp; map[2][2] == dot) {
              return true;
          }
  
          if (map[0][0] == dot &amp;&amp; map[1][1] == dot &amp;&amp; map[2][2] == dot) {
              return true;
          }
          if (map[0][2] == dot &amp;&amp; map[1][1] == dot &amp;&amp; map[2][0] == dot) {
              return true;
          }
  
          return false;
      }
  }
  </code></pre>
  <p>I almost done it.</p>
  <p>Last thing that i need refactor this part of code:</p>
  <pre><code>if (map[0][2] == dot &amp;&amp; map[1][1] == dot &amp;&amp; map[2][0] == dot) {
     return true;
  }
  </code></pre>
  <p>to something like</p>
  <pre><code>  if (map[i][0] == dot &amp;&amp; i == 2) {
            return true;
      }
  </code></pre>
  <p>Main question is here:</p>
  <pre><code>for (int i = 0; i&lt;3; i++){
    System.out.println(i);
  }
  
  output:
  0
  1
  2
  </code></pre>
  <p>I need to reverse this loop to output:</p>
  <pre><code>2
  1
  0
  </code></pre>
  <p>to feel this last part:</p>
  <pre><code>  if (map[i][0] == dot &amp;&amp; i == 2) {
            return true;
   }
  </code></pre>
  <p>i need to feel this last condition with values 2 1 0</p>
  <pre><code>  if (map[i][insert here] == dot &amp;&amp; i == 2) {
            return true;
   }
  </code></pre>
  <p>Please Help.</p>