Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1.     private static int linha(int pos, int colunas){
  2.         return (pos-1)/colunas+1;
  3.     }
  4.    
  5.     private static int coluna(int pos, int linha, int colunas){
  6.         return linha%2!=0?(pos-1)-(linha-1)*colunas+1:linha*colunas-pos+1;
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement