Commit 64344be1 authored by Aneta Steimarova's avatar Aneta Steimarova

#847 Code reformated

parent cb3da94e
......@@ -75,8 +75,8 @@ public enum SafeDifficulty {
public static SafeSequence getGeneratedSequence(GameDifficulty gameDifficulty, int level) {
Random random = new Random();
List<SafeSequence> listOfSafeSequences;
for(SafeDifficulty safeDifficulty: SafeDifficulty.values()){
if(safeDifficulty.getGameDifficulty().equals(gameDifficulty)) {
for (SafeDifficulty safeDifficulty : SafeDifficulty.values()) {
if (safeDifficulty.getGameDifficulty().equals(gameDifficulty)) {
listOfSafeSequences = safeDifficulty.arrayListOfsafeSequences.get(level);
return listOfSafeSequences.get(random.nextInt(listOfSafeSequences.size()));
}
......
......@@ -195,9 +195,9 @@ public enum SafeEasyLevelDefinition implements SafeLevelDefinition {
return listOfSequences;
}
private static List<SafeSequence> makeListOfSequences(List<SafeEasyLevelDefinition> possibilitiesList){
private static List<SafeSequence> makeListOfSequences(List<SafeEasyLevelDefinition> possibilitiesList) {
List<SafeSequence> listOfSequences = new ArrayList<>();
for(SafeEasyLevelDefinition easySequence: possibilitiesList){
for (SafeEasyLevelDefinition easySequence : possibilitiesList) {
listOfSequences.add(new SafeSequence(easySequence.getSoundSequence(), easySequence.getSoundsToSequence(), easySequence.getSoundsToLights(), easySequence.getExpectedSound(), easySequence.getPlayAgainFirstXSounds()));
}
return listOfSequences;
......@@ -208,7 +208,7 @@ public enum SafeEasyLevelDefinition implements SafeLevelDefinition {
*
* @return list of sound sequence for for whole levels
*/
public static ArrayList<List<SafeSequence>> makeArrayOfListOfSequences(){
public static ArrayList<List<SafeSequence>> makeArrayOfListOfSequences() {
ArrayList<List<SafeSequence>> arrayOfListOfSequences = new ArrayList<List<SafeSequence>>();
arrayOfListOfSequences.add(makeListOfSequences(getSequencesForFirstLevel()));
arrayOfListOfSequences.add(makeListOfSequences(getSequencesForSecondLevel()));
......
......@@ -149,9 +149,9 @@ public enum SafeHardLevelDefinition implements SafeLevelDefinition {
return listOfSequences;
}
private static List<SafeSequence> makeListOfSequences(List<SafeHardLevelDefinition> possibilitiesList){
private static List<SafeSequence> makeListOfSequences(List<SafeHardLevelDefinition> possibilitiesList) {
List<SafeSequence> listOfSequences = new ArrayList<>();
for(SafeHardLevelDefinition easySequence: possibilitiesList){
for (SafeHardLevelDefinition easySequence : possibilitiesList) {
listOfSequences.add(new SafeSequence(easySequence.getSoundSequence(), easySequence.getSoundsToSequence(), easySequence.getSoundsToLights(), easySequence.getExpectedSound(), easySequence.getPlayAgainFirstXSounds()));
}
return listOfSequences;
......
......@@ -169,9 +169,9 @@ public enum SafeMediumLevelDefinition implements SafeLevelDefinition {
return listOfSequences;
}
private static List<SafeSequence> makeListOfSequences(List<SafeMediumLevelDefinition> possibilitiesList){
private static List<SafeSequence> makeListOfSequences(List<SafeMediumLevelDefinition> possibilitiesList) {
List<SafeSequence> listOfSequences = new ArrayList<>();
for(SafeMediumLevelDefinition easySequence: possibilitiesList){
for (SafeMediumLevelDefinition easySequence : possibilitiesList) {
listOfSequences.add(new SafeSequence(easySequence.getSoundSequence(), easySequence.getSoundsToSequence(), easySequence.getSoundsToLights(), easySequence.getExpectedSound(), easySequence.getPlayAgainFirstXSounds()));
}
return listOfSequences;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment