aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/Difficulty.java9
-rw-r--r--src/main/SettingsController.java3
2 files changed, 7 insertions, 5 deletions
diff --git a/src/main/Difficulty.java b/src/main/Difficulty.java
index ebe7a3f..8420886 100644
--- a/src/main/Difficulty.java
+++ b/src/main/Difficulty.java
@@ -19,7 +19,7 @@ public class Difficulty
public String title;
private ObservableList<LeaderboardEntry> leaderboard = FXCollections.observableArrayList();
public File notes;
- public int bpm = 28;
+ public int bpm;
public File song;
public int numBeats;
private File leaderboardFile;
@@ -35,8 +35,8 @@ public class Difficulty
JSONObject diffStuff = (JSONObject)(obj); //converts read object to a JSONObject
title = (String) diffStuff.get("title");
- bpm = Integer.parseInt(""+diffStuff.get("bpm"));
- numBeats = Integer.parseInt(""+diffStuff.get("numBeats"));
+ bpm = (int)(diffStuff.get("bpm"));
+ numBeats = (int)(diffStuff.get("numBeats"));
}
catch (Exception e)
@@ -99,7 +99,8 @@ public class Difficulty
}
}
- public ObservableList<LeaderboardEntry> getLeaderboard() {
+ public ObservableList<LeaderboardEntry> getLeaderboard()
+ {
return leaderboard;
}
}
diff --git a/src/main/SettingsController.java b/src/main/SettingsController.java
index 5978b9c..f3bd671 100644
--- a/src/main/SettingsController.java
+++ b/src/main/SettingsController.java
@@ -28,7 +28,8 @@ public class SettingsController
file.write(settings.toJSONString());
file.flush();
- } catch (IOException e) {
+ }
+ catch (IOException e) {
e.printStackTrace();
}
}