Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. private static void place(int column, int value)
  2.     {
  3.         int pos = 5; //sets the lowest possible index to 5
  4.         column--; //converts the input column to an index
  5.         while (pos>0 && board[pos][column] != 0) //keep going down until you hit something that's not 0
  6.         {
  7.             pos--;
  8.         }
  9.         board[pos][column] = value;
  10.         //System.out.println("The lowest position is: " + pos);
  11.  
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement