Coverage Summary for Class: Settings (io.github.unisim)
| Class |
Method, %
|
Line, %
|
| Settings |
60%
(3/5)
|
62.5%
(5/8)
|
| Settings$Difficulty |
100%
(2/2)
|
100%
(4/4)
|
| Total |
71.4%
(5/7)
|
75%
(9/12)
|
package io.github.unisim;
/**
* Contains global settings for the game such as volume.
*/
public class Settings {
private Difficulty currentDifficulty = Difficulty.MEDIUM;
private String playerName;
public enum Difficulty {
EASY,
MEDIUM,
HARD
}
public void setDifficulty(Difficulty difficulty) {
this.currentDifficulty = difficulty;
}
public Difficulty getDifficulty() {
return this.currentDifficulty;
}
public void setPlayerName(String name) {
this.playerName = name;
}
public String getPlayerName() {
return this.playerName;
}
}