-
Notifications
You must be signed in to change notification settings - Fork 2
/
Launch.java
40 lines (28 loc) · 975 Bytes
/
Launch.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
import java.util.Random;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.input.MouseButton;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Launch extends Application {
private Board enemyBoard, playerBoard;
Board b = new Board(false);
VBox vbox = new VBox(50, enemyBoard, playerBoard);
public void start(Stage primaryStage) throws Exception {
StackPane root = new StackPane();
root.getChildren().add(b);
Scene scene = new Scene(root, 500,500);
primaryStage.setTitle("Battleship");
primaryStage.setScene(scene);
primaryStage.setResizable(false);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}