Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.goverment;
- import static org.goverment.Tg.cout;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.IOException;
- import java.io.PrintWriter;
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Properties;
- import java.util.Random;
- public class Game {
- public static String name;
- public static final Properties prop = new Properties();
- public static final void setup(List<String> list, String name,
- boolean soviet) throws IOException {
- File fl = new File(
- "C:\\Documents and Settings\\Administrator"
- + "\\Application Data\\thegoverment.properties");
- if (!fl.exists()) {
- fl.createNewFile();
- PrintWriter writer = new PrintWriter(fl);
- writer.println("###################");
- writer.println("# The Goverment #");
- writer.println("# Propertiiis #");
- writer.println("# Only for Cheats #");
- writer.println("###################");
- writer.println("");
- String s = "";
- for (String d : list) {
- s = s + d.replace(" ", ";") + "-";
- }
- s = s.substring(0, s.length() - 1);
- writer.println("other-countries=" + s);
- writer.println("country-name=" + name);
- writer.println("is-soviet-country=" + soviet);
- writer.close();
- }
- cout(fl.getAbsolutePath() + "/");
- prop.load(new FileInputStream(fl));
- }
- public static final List<String> cc() {
- List<String> countryNames = new ArrayList<String>();
- for (int i = 0; i < 48; i++) {
- boolean done = false;
- while (!done) {
- String name = choose("The Republic of ", "United States of ",
- "")
- + choose("Christian Federation", "Ironia", "Onyxia",
- "Nervia", "China", "Ukraine", "America",
- "Japan", "Korea", "Laxembourg");
- if (!countryNames.contains(name)) {
- countryNames.add(name);
- done = true;
- }
- }
- }
- return countryNames;
- }
- private static String choose(String... s) {
- return s[new Random().nextInt(s.length)];
- }
- public static void start() {
- cout("Country Name: " + name + "/");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement