diff options
Diffstat (limited to 'src/Q8/Point.java')
| -rw-r--r-- | src/Q8/Point.java | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/Q8/Point.java b/src/Q8/Point.java index 9040516..4b0b86e 100644 --- a/src/Q8/Point.java +++ b/src/Q8/Point.java @@ -1,26 +1,40 @@ package Q8; public class Point { + public static final int PLAYER1 = 0; + public static final int PLAYER2 = 1; private int player; private int score; - private static final int PLAYER1 = 0; - private static final int PLAYER2 = 1; private String stroke; - public Point(int player, String stroke, int value) { + public Point(int player, String stroke, int score) { this.player = player; this.stroke = stroke; + this.score = score; } public int getPlayer() { - return 0; + return this.player; } public int getScore() { - return 0; + return this.score; } public String getStroke() { - return ""; + switch (this.stroke) { + case "a": + return "slice"; + case "b": + return "drive"; + case "c": + return "smash"; + case "d": + return "drop"; + case "e": + return "net-shot"; + default: + return "unknown"; + } } } |
