summaryrefslogtreecommitdiff
path: root/src/model/Round.java
diff options
context:
space:
mode:
authorWillemDalton <willemhdalton@gmail.com>2025-10-02 08:55:33 -0400
committerWillemDalton <willemhdalton@gmail.com>2025-10-02 08:55:33 -0400
commite218e35f333f8a30d213c7d3eebeb6f5f6bbcea3 (patch)
treeafc16118dd13e4ab089a85df90be11a80b157fd2 /src/model/Round.java
parentc03d30761e74e27815e6b7639f9ff4ec4e5c185a (diff)
downloaddesignproject-design-6-e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3.tar.gz
designproject-design-6-e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3.tar.bz2
designproject-design-6-e218e35f333f8a30d213c7d3eebeb6f5f6bbcea3.zip
more progress on the strategy, unit testing
Diffstat (limited to 'src/model/Round.java')
-rw-r--r--src/model/Round.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/model/Round.java b/src/model/Round.java
deleted file mode 100644
index 38975da..0000000
--- a/src/model/Round.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package design.model;
-
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-
-public class Round {
- private final transient Course course;
- private final LocalDateTime dateTime;
- private final Hole startingHole;
- private final List<Play> plays;
-
- public Round(Course course, LocalDateTime dateTime, Hole startingHole) {
- this.course = course;
- this.dateTime = dateTime;
- this.startingHole = startingHole;
- plays = new ArrayList<>();
- }
-
- public int getTotalSwings() {
- return plays.stream()
- .map(Play::getSwingCount)
- .reduce(0, Integer::sum);
- }
-
- public Course getCourse() {
- return course;
- }
-
- public LocalDateTime getDateTime() {
- return dateTime;
- }
-
- public Hole getStartingHole() {
- return startingHole;
- }
-
- public Play[] getPlays() {
- return plays.toArray(Play[]::new);
- }
-
- public void addPlay(Play play) {
- plays.add(play);
- }
-}