added the penguin SELF MADE

This commit is contained in:
Aysegul Aydinlik 2026-01-15 16:05:29 +01:00
commit ddd81814e5
4 changed files with 21 additions and 0 deletions

View file

@ -5,16 +5,26 @@ import client.scenes.MainCtrl;
import client.utils.ServerUtils;
import com.google.inject.Injector;
import javafx.application.Application;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import static com.google.inject.Guice.createInjector;
public class UI extends Application {
private static final Injector INJECTOR = createInjector(new MyModule());
private static final MyFXML FXML = new MyFXML(INJECTOR);
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.getIcons().add(
new Image(getClass().getResourceAsStream("/Penguin.png"))
);
var serverUtils = INJECTOR.getInstance(ServerUtils.class);
if (!serverUtils.isServerAvailable()) {
var msg = "Server needs to be started before the client, but it does not seem to be available. Shutting down.";