Skip to content

Instantly share code, notes, and snippets.

@infideleraser
Last active September 7, 2018 00:48
Show Gist options
  • Save infideleraser/de870aba771e3bc7b9b6c0f90bf96d37 to your computer and use it in GitHub Desktop.
Save infideleraser/de870aba771e3bc7b9b6c0f90bf96d37 to your computer and use it in GitHub Desktop.
import java.net.*;
import java.awt.Desktop;
import java.io.*;
import java.util.Random;
import javax.swing.JOptionPane;
public class WhatGame {
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
Random rand = new Random();
int value = rand.nextInt(8);
if (value == 0) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "End some demons",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("steam://rungameid/379720"));
System.exit(0);
} else if (value == 1) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "Monty is sheild daddy",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("steam://rungameid/359550"));
System.exit(0);
} else if (value == 2) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "Slay some dragons",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("steam://rungameid/365720"));
System.exit(0);
} else if (value == 3) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "Initiate nuclear fallout",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("steam://rungameid/377160"));
System.exit(0);
} else if (value == 4) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "Abortnite",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("com.epicgames.launcher://apps/Fortnite?action=launch&silent=true"));
System.exit(0);
} else if (value == 5) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "Be a Criminal",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Runtime.getRuntime().exec("D:\\rockstar\\PlayGTAV.exe", null, new File("D:\\rockstar\\PlayGTAV.exe"));
System.exit(0);
} else if (value == 6) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "Explore a new galaxy",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("steam://rungameid/275850"));
System.exit(0);
} else if (value == 7) {
String[] options = {"Play Game", "Quit"};
int x = JOptionPane.showOptionDialog(null, "The real Battle Royale",
"Select one",
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
if (x==0)
Desktop.getDesktop().browse(URI.create("steam://rungameid/578080"));
System.exit(0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment