source: src/main/java/genius/core/Feedback.java@ 256

Last change on this file since 256 was 127, checked in by Wouter Pasman, 6 years ago

#41 ROLL BACK of rev.126 . So this version is equal to rev. 125

File size: 547 bytes
Line 
1package genius.core;
2
3import java.util.List;
4
5public enum Feedback {
6 BETTER, SAME, WORSE;
7
8 public static Vote isAcceptable(List<Feedback> feedbackList) {
9
10 for (Feedback currentFeedback : feedbackList)
11 if (currentFeedback == Feedback.WORSE)
12 return Vote.REJECT;
13
14 return Vote.ACCEPT;
15 }
16
17 public static Feedback madeupFeedback(double previous, double current) {
18
19 if (previous > current)
20 return Feedback.WORSE;
21 else if (previous == current)
22 return Feedback.SAME;
23 else
24 return Feedback.BETTER;
25 }
26}
Note: See TracBrowser for help on using the repository browser.