Skip to content

Commit 969b348

Browse files
author
raytr
committed
Added jar
1 parent c644b6a commit 969b348

15 files changed

+14
-1
lines changed

ShootingGame.jar

115 KB
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Main-Class: game.GameLauncher
3+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/META-INF/MANIFEST.MF

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
Main-Class: game.GameLauncher
3+

src/game/GameLauncher.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
import javafx.stage.WindowEvent;
2424

2525
import java.io.File;
26+
import java.net.Inet4Address;
2627
import java.net.InetSocketAddress;
28+
import java.net.UnknownHostException;
2729

2830
public class GameLauncher extends Application {
2931
private GridPane grid;
@@ -96,7 +98,7 @@ public void start(Stage primaryStage) {
9698

9799
Label errMsg2 = new Label("");
98100
errMsg2.setFont(Font.font("Arial", 12));
99-
grid.add(errMsg2, 6, 4);
101+
grid.add(errMsg2, 6, 5);
100102
// Set font color for the Label.
101103
errMsg2.setTextFill(Color.rgb(255, 0, 0));
102104

@@ -159,6 +161,11 @@ public void handle(ActionEvent e) {
159161
btn2.setText("Stop server");
160162
portField2.setDisable(true);
161163
btn3.setDisable(false);
164+
try {
165+
errMsg2.setText("Server running on: " +Inet4Address.getLocalHost().getHostAddress());
166+
}catch (UnknownHostException t){
167+
//lol
168+
}
162169
} else {
163170
gameServer.stop();
164171
btn2.setText("Make a server");

0 commit comments

Comments
 (0)