Narrowed variables scope.

This commit is contained in:
vraskulin 2017-02-15 16:05:18 +03:00
parent 09da478b38
commit f1ef3bf68b
20 changed files with 42 additions and 60 deletions

View file

@ -62,9 +62,8 @@ public class GameFactory {
public Match createMatch(String gameType, MatchOptions options) {
Match match;
Constructor<Match> con;
try {
con = games.get(gameType).getConstructor(MatchOptions.class);
Constructor<Match> con = games.get(gameType).getConstructor(MatchOptions.class);
match = con.newInstance(options);
} catch (Exception ex) {
logger.fatal("Error creating match - " + gameType, ex);