diff options
| -rw-r--r-- | assets/texts/splashes.txt | 1 | ||||
| -rw-r--r-- | desktop/src/kz/ilotterytea/maxon/DesktopLauncher.java | 27 |
2 files changed, 1 insertions, 27 deletions
diff --git a/assets/texts/splashes.txt b/assets/texts/splashes.txt deleted file mode 100644 index dc9ed2e..0000000 --- a/assets/texts/splashes.txt +++ /dev/null @@ -1 +0,0 @@ -Почесончик!
\ No newline at end of file diff --git a/desktop/src/kz/ilotterytea/maxon/DesktopLauncher.java b/desktop/src/kz/ilotterytea/maxon/DesktopLauncher.java index 3fb3d2a..230dc5f 100644 --- a/desktop/src/kz/ilotterytea/maxon/DesktopLauncher.java +++ b/desktop/src/kz/ilotterytea/maxon/DesktopLauncher.java @@ -3,39 +3,14 @@ package kz.ilotterytea.maxon; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; -import java.util.ArrayList; -import java.util.Objects; -import java.util.Scanner; - // Please note that on macOS your application needs to be started with the -XstartOnFirstThread JVM argument public class DesktopLauncher { public static void main (String[] arg) { Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration(); config.setForegroundFPS(60); - config.setTitle(String.format("%s %s: %s", MaxonConstants.GAME_NAME, MaxonConstants.GAME_VERSION, getRandomLine())); + config.setTitle(MaxonConstants.GAME_NAME); config.setWindowIcon("icon_chest.png"); new Lwjgl3Application(MaxonGame.getInstance(), config); } - - private static String getRandomLine() { - String line = "missingno"; - - try { - Scanner scanner = new Scanner( - Objects.requireNonNull(Thread.currentThread().getContextClassLoader().getResourceAsStream("texts/splashes.txt")) - ); - ArrayList<String> strings = new ArrayList<>(); - - while (scanner.hasNext()) { - strings.add(scanner.next()); - } - - line = strings.get((int) Math.floor(Math.random() * strings.size())); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - return line; - } } |
