} );
}
@Nullable
private static PERPENDICULAR_DIRECTION getDirection( int key ) {
final GameSettings singleton = GameSettings.getInstance();
if ( singleton.getValue( GameSettings.INTEGER_SETTINGS_TYPE.KEY_DOWN ) == key ) {
return PERPENDICULAR_DIRECTION.DOWN;
}
if ( singleton.getValue( GameSettings.INTEGER_SETTINGS_TYPE.KEY_UP ) == key ) {
return PERPENDICULAR_DIRECTION.UP;
}
if ( singleton.getValue( GameSettings.INTEGER_SETTINGS_TYPE.KEY_LEFT ) == key ) {
return PERPENDICULAR_DIRECTION.LEFT;
}
if ( singleton.getValue( GameSettings.INTEGER_SETTINGS_TYPE.KEY_RIGHT ) == key ) {
return PERPENDICULAR_DIRECTION.RIGHT;
}
return null;
}