Created
November 16, 2015 03:49
-
-
Save e-tverdokhleb/2b0a863b6d867499374f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
System.out.println(getQuadrant("a", "1")); | |
} | |
static String getQuadrant(String v, String h) { // means that input data is correct | |
String str_v = "abcdefghi"; | |
return (Integer.valueOf(h) * 64) + "_" + (str_v.indexOf(v) + 1) * 64; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Согласно Вашей программе, Вы определяете не координаты верхнего левого угла заданного квадранта, а координаты следующего по диагонали квадранта.