From f2fd2b5993aa5bef38352b6b562b132bfdb9e8b3 Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Thu, 18 Jun 2015 20:17:47 +0200 Subject: [PATCH] Added times played --- audio/SongInstance.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/audio/SongInstance.java b/audio/SongInstance.java index c4e7a76..472b29b 100644 --- a/audio/SongInstance.java +++ b/audio/SongInstance.java @@ -6,6 +6,7 @@ import java.util.List; public class SongInstance { private String difficulty; + private int timesPlayed; private List objects; private List buttons; @@ -13,6 +14,7 @@ public class SongInstance { public SongInstance(String difficulty) { this.difficulty = difficulty; + this.timesPlayed = 0; objects = new ArrayList(); buttons = new ArrayList(); @@ -83,4 +85,17 @@ public class SongInstance { return b; } + + public int getTimesPlayed() { + return timesPlayed; + } + + public void setTimesPlayed(int timesPlayed) { + this.timesPlayed = timesPlayed; + } + + public void played() + { + timesPlayed++; + } }