blob: c5432132e33953b709640ad6b905c22dd367bfde (
plain)
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
|
package com.ilotterytea.maxoning;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
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) throws FileNotFoundException {
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setForegroundFPS(60);
config.setTitle(String.format("Maxon Petting Simulator - %s", getRandomLine()));
config.setWindowIcon("icon.png");
config.setWindowedMode(1280, 720);
//config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
new Lwjgl3Application(new MaxonGame(), config);
}
private static String getRandomLine() throws FileNotFoundException {
Scanner scan = new Scanner(new File("texts/splashes.txt"));
ArrayList<String> strings = new ArrayList<>();
while (scan.hasNext()) {
strings.add(scan.next());
}
return strings.get((int) Math.floor(Math.random() * strings.size()));
}
}
|