Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static int linha(int pos, int colunas){
- return (pos-1)/colunas+1;
- }
- private static int coluna(int pos, int linha, int colunas){
- return linha%2!=0?(pos-1)-(linha-1)*colunas+1:linha*colunas-pos+1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement