Advertisement
jonnern7

Untitled

Mar 29th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1.     /**
  2.      * Generates a dictionary that converts a textual position to indexes in board
  3.      */
  4.     private void generatePositionToIntsDictionary() {
  5.         for(int row = 0; row<8; row++){
  6.             for(char c : "ABCDEFGH".toCharArray()){
  7.                 positionToIntsDictionary.put(c + Integer.toString(8-row),row + "," + ((int) c - 65));
  8.             }
  9.         }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement