-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
67 lines (58 loc) · 1.53 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package application;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
//OLD MAIN CLASS. FOR TESTING
/**
* This is main class for the user to run this game
* @author div,salil
*
*/
public class Main extends Application {
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
* This class has extended Application so we need to override the default method of the super class
*/
@Override
public void start(Stage primaryStage) {
try {
/*
Parent root = FXMLLoader.load(getClass().getResource("Game.fxml"));
primaryStage.setTitle("Game Window");
primaryStage.setScene(new Scene(root, 297, 500));
primaryStage.show();
*/
/*
Ball ball = new Ball();
ball.setFill(Color.AQUAMARINE);
ball.setRadius(50);
ball.setLayoutX(50);
ball.setLayoutY(50);
ball.moveLeft();
Pane root = new Pane();
root.getChildren().add(ball);
Scene scene = new Scene(root, 500, 500);
primaryStage.setTitle("Movement");
primaryStage.setScene(scene);
primaryStage.show();
*/
Game game = new Game();
primaryStage = game.gameStage;
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
/**
* This is the main method of this class
* @param args array of String argument
*/
public static void main(String[] args) {
launch(args);
}
}