From b2dced13a9a8697473d71afd2ec394e52bfcb7ae Mon Sep 17 00:00:00 2001 From: Hammy Date: Tue, 22 Dec 2020 08:56:41 +0000 Subject: [PATCH] Tidy Up Code --- Personal/src/cards/Faces.java | 2 +- Personal/src/cards/Sevens.java | 4 +--- Personal/src/cards/Suits.java | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Personal/src/cards/Faces.java b/Personal/src/cards/Faces.java index 105b45a..ffc0fab 100644 --- a/Personal/src/cards/Faces.java +++ b/Personal/src/cards/Faces.java @@ -4,7 +4,7 @@ public enum Faces { ACE(1), TWO(2), THREE(3), FOUR(4), FIVE(5), SIX(6), SEVEN(7), EIGHT(8), NINE(9), TEN(10), JACK(11), QUEEN(12), KING(13); - private int face; + private final int face; Faces(int face) { this.face = face; diff --git a/Personal/src/cards/Sevens.java b/Personal/src/cards/Sevens.java index e2c8964..ce3ab2d 100644 --- a/Personal/src/cards/Sevens.java +++ b/Personal/src/cards/Sevens.java @@ -5,9 +5,7 @@ import java.util.Scanner; public class Sevens extends Deck { - public Sevens() { - super(); - } + public Sevens() { } public void play(List allPlayers, int numOfPlayers) { int playerCounter = 0; diff --git a/Personal/src/cards/Suits.java b/Personal/src/cards/Suits.java index eccf3ae..7604e04 100644 --- a/Personal/src/cards/Suits.java +++ b/Personal/src/cards/Suits.java @@ -3,7 +3,7 @@ package cards; public enum Suits { SPADES("Spades"), HEARTS("Hearts"), DIAMONDS("Diamonds"), CLUBS("Clubs"); - private String suit; + private final String suit; Suits(String suit) { this.suit = suit;