Skip to content
Snippets Groups Projects
Commit 55162ab4 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

Merge branch 'feature-nightwatch' into 'devel'

Feature nightwatch

V případě konfliktu prosím ponechat vytvoření pixmapy tak, jak je to v develu, tzn v metodě:
 protected int[][] prepareGameData(Map<String, String> gameState)

See merge request !55
parents f87eccda 8693b0c9
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@ public class GameSolutionGenerator {
int totalWindows = GameRulesHelper.getNumberOfWindowsForDifficulty(difficulty);
int lightenedWindows = GameRulesHelper.getNumberOfWindowsLightenedInCurrentRound(difficulty,i);
Solution currentRoundSolution = new Solution(PropertiesGenerator.getRandomWindowSequence(totalWindows,lightenedWindows,random),PropertiesGenerator.getRandomTime());
Solution currentRoundSolution = new Solution(PropertiesGenerator.getRandomWindowSequence(totalWindows,lightenedWindows,random),PropertiesGenerator.getRandomTime(random));
currentLevelSolutions.add(currentRoundSolution);
}
mapToReturn.put(i,currentLevelSolutions);
......
......@@ -27,8 +27,7 @@ public class PropertiesGenerator {
}
public static int getRandomTime(){
Random r = new Random();
public static int getRandomTime(Random r){
return r.nextInt((MAX_TIME - MIN_TIME) + 1) + MIN_TIME;
}
}
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