-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatistics.java
More file actions
38 lines (30 loc) · 844 Bytes
/
Statistics.java
File metadata and controls
38 lines (30 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package wordle_gui;
import java.io.Serializable;
/**
* Statistics.java
* Implements statistics POJO for game stats.
* @author DrkWithT
*/
public class Statistics implements Serializable {
private double roundsLost;
private double roundsWon;
public Statistics(double roundsLost, double roundsWon) {
this.roundsLost = roundsLost;
this.roundsWon = roundsWon;
}
public double getRoundsLost() {
return roundsLost;
}
public double getRoundsWon() {
return roundsWon;
}
public double getTotalRounds() {
return roundsLost + roundsWon;
}
public void setRoundsLost(double roundsLost) {
this.roundsLost = roundsLost;
}
public void setRoundsWon(double roundsWon) {
this.roundsWon = roundsWon;
}
}