Skip to content
Snippets Groups Projects
Commit d583c420 authored by Kjetil Karstensen Indrehus's avatar Kjetil Karstensen Indrehus
Browse files

fix: linting from feedback

parent c846d371
Branches
No related tags found
No related merge requests found
...@@ -25,12 +25,7 @@ public class DeckOfCards { ...@@ -25,12 +25,7 @@ public class DeckOfCards {
for(int i = 0; i<=3;i++){ for(int i = 0; i<=3;i++){
char face = suit[i]; char face = suit[i];
for(int k = 1; k<=13; k++){ for(int k = 1; k<=13; k++){
try{
cards.add(new PlayingCard(face,k)); cards.add(new PlayingCard(face,k));
}catch (NullPointerException e){
System.err.println("Card Missing!");
}
} }
} }
} }
...@@ -46,7 +41,6 @@ public class DeckOfCards { ...@@ -46,7 +41,6 @@ public class DeckOfCards {
* @param n the amount of cards to return * @param n the amount of cards to return
* @return return an arraylist of cards * @return return an arraylist of cards
*/ */
public ArrayList<PlayingCard> dealHand(int n){ public ArrayList<PlayingCard> dealHand(int n){
ArrayList<PlayingCard> hand = new ArrayList<>(); ArrayList<PlayingCard> hand = new ArrayList<>();
while (n >= 1){ while (n >= 1){
......
...@@ -159,7 +159,7 @@ public class Controller implements Initializable { ...@@ -159,7 +159,7 @@ public class Controller implements Initializable {
Alert alert = new Alert(Alert.AlertType.CONFIRMATION); Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setHeaderText("Version: v.0.0.1"); alert.setHeaderText("Version: v.0.0.1");
alert.initStyle(StageStyle.UNDECORATED); alert.initStyle(StageStyle.UNDECORATED);
Optional<ButtonType> result = alert.showAndWait(); alert.showAndWait();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment