Skip to content

Commit e3b04b5

Browse files
author
abecirovic3
committed
done some refactoring
1 parent 2256c21 commit e3b04b5

File tree

8 files changed

+3
-14
lines changed

8 files changed

+3
-14
lines changed

out/production/Jumpy/credits/credits.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.
0 Bytes
Binary file not shown.
-48 Bytes
Binary file not shown.

resources/credits/credits.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/sample/AboutController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ public void closeAction(ActionEvent actionEvent) {
2222
Stage currStage = (Stage) node.getScene().getWindow();
2323
currStage.close();
2424
}
25-
2625
}

src/sample/GameController.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import javafx.application.Platform;
44
import javafx.collections.ObservableList;
55
import javafx.event.ActionEvent;
6-
import javafx.event.EventHandler;
76
import javafx.fxml.FXML;
87
import javafx.fxml.FXMLLoader;
98
import javafx.geometry.Pos;
@@ -343,7 +342,7 @@ public void restartAction(ActionEvent actionEvent) {
343342

344343
if (chosenAlertOption == ButtonType.OK) {
345344
closeCurrentStage();
346-
// need to find better way of stopping the stopwatch thread ^ˇ
345+
// should've used better logic for stopping the stop watch thread
347346
try {
348347
Thread.currentThread().sleep(1000);
349348
} catch (InterruptedException e) {
@@ -370,7 +369,7 @@ public void restartAction(ActionEvent actionEvent) {
370369
}
371370

372371
private ButtonType showConfirmationAlert() {
373-
Optional<ButtonType> result = Optional.of(ButtonType.OK);
372+
Optional<ButtonType> result;
374373
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
375374
alert.setTitle("Confirmation");
376375
alert.setHeaderText("Are you sure you want to start a new game?");

src/sample/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Main extends Application {
1414
public void start(Stage primaryStage) throws Exception{
1515
MainController ctrl = new MainController();
1616

17-
// we need hostServices for opening links from other controllers
17+
// we need hostServices for opening links in browser from other controllers
1818
GameModel m = GameModel.getInstance();
1919
m.setHostServices(getHostServices());
2020

src/sample/MainController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package sample;
22

3-
import javafx.application.HostServices;
43
import javafx.application.Platform;
54
import javafx.event.ActionEvent;
65
import javafx.fxml.FXMLLoader;

0 commit comments

Comments
 (0)