src/edu/kit/informatik/tessellation/BoardPosition.java
/**
     * Calculates the {@linkplain BoardPosition} 
     * associated to a given index of the codification list in [{@linkplain Board}
     * @param index A index of the codification list in [{@linkplain Board}
     * @param elementsCol number element in column
     * @param elementsRow number elements in row
     * @return The value associated to the index
     */
Calculates the  BoardPosition
associated to a given index of the codification list in [ Board
@param index A index of the codification list in [ Board
@param elementsCol number element in column
@param elementsRow number elements in row
@return The value associated to the index
Calculates the BoardPosition associated to a given index of the codification list in [ Board @param index A index of the codification list in [ Board @param elementsCol number element in column @param elementsRow number elements in row @return The value associated to the index
public static BoardPosition calculatePosition(int index, final int elementsCol, final int elementsRow) {
        /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the upper left corner of the game board
         */
        final int upperLeftCornerValue = 0;
        /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the down left corner of the game board
         */
        final int downLeftCornerValue = elementsCol - 1;
        /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the upper left corner of the game board
         */
        final int upperRightCornerValue = (elementsRow - 1) * elementsCol;
        /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the down right corner of the game board
         */
        final int downRightCornerValue = (elementsRow * elementsCol) - 1;
        BoardPosition boardPositon = null;
        if (index == (upperLeftCornerValue)) {
            boardPositon = BoardPosition.UPPER_LEFT_CORNER;
        } else if (index == (downLeftCornerValue)) {
            boardPositon = BoardPosition.DOWN_LEFT_CORNER;
        } else if (index == (upperRightCornerValue)) {
            boardPositon = BoardPosition.UPPER_RIGHT_CORNER;
        } else if (index == (downRightCornerValue)) {
            boardPositon = BoardPosition.DOWN_RIGH_CORNER;
        } else if (index % Board.ELEMENTS_COLUMN == 0) {
             boardPositon = BoardPosition.UPPER_SIDE;
         } else if (index % Board.ELEMENTS_COLUMN == downLeftCornerValue) {
             boardPositon = BoardPosition.DOWN_SIDE;
         } else if (index > upperRightCornerValue) {
             boardPositon = BoardPosition.RIGHT_SIDE;
         } else if ( index < downLeftCornerValue) {
             boardPositon = BoardPosition.LEFT_SIDE;
         } else {
             boardPositon = BoardPosition.INTERNAL;
         }        
         return boardPositon;
    }
public static BoardPosition calculatePosition ( int index , final int elementsCol , final int elementsRow ) { /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the upper left corner of the game board
         */ final int upperLeftCornerValue = 0 ; /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the down left corner of the game board
         */ final int downLeftCornerValue = elementsCol - 1 ; /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the upper left corner of the game board
         */ final int upperRightCornerValue = ( elementsRow - 1 ) * elementsCol ; /**
         * The value of the index in the codification list in {@linkplain Board}
         * related to the tile located in the down right corner of the game board
         */ final int downRightCornerValue = ( elementsRow * elementsCol ) - 1 ; BoardPosition boardPositon = null ; if ( index == ( upperLeftCornerValue ) ) { boardPositon = BoardPosition . UPPER_LEFT_CORNER ; } else if ( index == ( downLeftCornerValue ) ) { boardPositon = BoardPosition . DOWN_LEFT_CORNER ; } else if ( index == ( upperRightCornerValue ) ) { boardPositon = BoardPosition . UPPER_RIGHT_CORNER ; } else if ( index == ( downRightCornerValue ) ) { boardPositon = BoardPosition . DOWN_RIGH_CORNER ; } else if ( index % Board . ELEMENTS_COLUMN == 0 ) { boardPositon = BoardPosition . UPPER_SIDE ; } else if ( index % Board . ELEMENTS_COLUMN == downLeftCornerValue ) { boardPositon = BoardPosition . DOWN_SIDE ; } else if ( index > upperRightCornerValue ) { boardPositon = BoardPosition . RIGHT_SIDE ; } else if ( index < downLeftCornerValue ) { boardPositon = BoardPosition . LEFT_SIDE ; } else { boardPositon = BoardPosition . INTERNAL ; } return boardPositon ; }
Calculates the {@linkplain BoardPosition}
 associated to a given index of the codification list in [{@linkplain Board}
 @param index A index of the codification list in [{@linkplain Board}
 @param elementsCol number element in column
 @param elementsRow number elements in row
 @return The value associated to the index
Calculates the { @linkplain BoardPosition } associated to a given index of the codification list in [ { @linkplain Board } @param index A index of the codification list in [ { @linkplain Board } @param elementsCol number element in column @param elementsRow number elements in row @return The value associated to the index