0% found this document useful (0 votes)
3 views2 pages

Random Event Generator in Java

JAVA - TTRPG LONG DISTANCE TRAVEL - MODULE

Uploaded by

Starr Nichols
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Random Event Generator in Java

JAVA - TTRPG LONG DISTANCE TRAVEL - MODULE

Uploaded by

Starr Nichols
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

import [Link].

ArrayList;
import [Link];

public class EventArrays {


public static String[] easyArray(){
ArrayList<String[]> easyRE = new ArrayList<String[]>();
//String set up{"Descriptiong of Event", "Does this trigger a greater
event/0, no, 1+ references larger Event", "water change", "ration change", time
Change"}
String[] re1={"You come across a cat. It gives you advice\n","0","-3","-
3","-1"};
[Link](re1);
String[] re2={"You come across a cat. It gives you advice\n","0","-2","-
3","-1"};
[Link](re2);

//initizing random
Random random_method = new Random();
//Generation Random point in ArrayList
int index = random_method.nextInt([Link]());
//Fill in Array with random chosen section of array list
String[] easyRRE = [Link](index);
//Return String Array to be parsed; Reference parse information from string
to int below
// int foodChange =[Link](ArrayReference)
// int waterChange
// int timeChange
return easyRRE;
}

public static String[] mediumArray(){


ArrayList<String[]> easyRE = new ArrayList<String[]>();
//String set up{"Descriptiong of Event", "Does this trigger a greater
event/0, no, 1+ references larger Event", "water change", "ration change", time
Change"}
String[] re1={"You come across a cat. It gives you advice\n","0","3","-
3","-1"};
[Link](re1);
String[] re2={"You come across a cat. It gives you advice\n","0","3","-
3","-1"};
[Link](re2);

//initizing random
Random random_method = new Random();
//Generation Random point in ArrayList
int index = random_method.nextInt([Link]());
//Fill in Array with random chosen section of array list
String[] easyRRE = [Link](index);
//Return String Array to be parsed; Reference parse information from string
to int below
// int foodChange =[Link](ArrayReference)
// int waterChange
// int timeChange
return easyRRE;
}

public static String[] hardArray(){


ArrayList<String[]> easyRE = new ArrayList<String[]>();
//String set up{"Descriptiong of Event", "Does this trigger a greater
event/0, no, 1+ references larger Event", "water change", "ration change", time
Change"}
String[] re1={"You come across a cat. It gives you advice\n","0","3","-
3","-1"};
[Link](re1);
String[] re2={"You come across a cat. It gives you advice\n","0","3","-
3","-1"};
[Link](re2);

//initizing random
Random random_method = new Random();
//Generation Random point in ArrayList
int index = random_method.nextInt([Link]());
//Fill in Array with random chosen section of array list
String[] easyRRE = [Link](index);
//Return String Array to be parsed; Reference parse information from string
to int below
// int foodChange =[Link](ArrayReference)
// int waterChange
// int timeChange
return easyRRE;
}

public static String[] superhardArray(){


ArrayList<String[]> easyRE = new ArrayList<String[]>();
//String set up{"Descriptiong of Event", "Does this trigger a greater
event/0, no, 1+ references larger Event", "water change", "ration change", time
Change"}
String[] re1={"You come across a cat. It gives you advice\n","0","3","-
3","-1"};
[Link](re1);
String[] re2={"You come across a cat. It gives you advice\n","0","3","-
3","-1"};
[Link](re2);

//initizing random
Random random_method = new Random();
//Generation Random point in ArrayList
int index = random_method.nextInt([Link]());
//Fill in Array with random chosen section of array list
String[] easyRRE = [Link](index);
//Return String Array to be parsed; Reference parse information from string
to int below
// int foodChange =[Link](ArrayReference)
// int waterChange
// int timeChange
return easyRRE;
}

You might also like