📄 settings.java
字号:
/*
* Settings.java
*
* Created on 03 December 2006, 21:18
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package wpc.data;
import java.io.Serializable;
/**
*
* @author willis
*/
public class Settings implements Serializable, settingsInterface{
private String testString;
private int maxRandomContinents = 2;
private int maxRandomCountries = 5;
private int maxRandomCounties = 9;
private int maxRandomTowns = 20;
private int maxRandomHouses = 20;
private int maxRandomPeople = 5;
private int maxWorldTraversal = 1;
/*0 = create world;
*1 = create continents;
*2 = create countrys;
*3 = create county;
*4 = create towns;
*5 = create houses;
*6 = create people;
*/
private int maxWorldHeight = 255;
private int minWorldHeight = 0;
private int maxStartHeight = 200;
private int minStartHeight = 0;
private double smoothness = 0.1;
private int algorithm = 0;
/*0 = DiamondSquare
*1 = Perlin Noise
**/
private int sealevel = 10;
private int mountainlevel = 150;
private int[][] patterns = {
{50,50,50,50},
{100,50,100,50} };
private boolean randomStartDiamondSquare = false;
private int diamondSquarePattern = 0;
private boolean delayPerson = false;
private boolean delayHouse = true;
private boolean delayTown = false;
private boolean delayCounty = true;
private boolean delayCountry = false;
private boolean delayContinent = false;
private int personThreadDelay = 1;
private int houseThreadDelay = 1;
private int townThreadDelay = 1;
private int countyThreadDelay = 5;
private int countryThreadDelay = 5;
private int continentThreadDelay = 5;
private boolean highDebugLevel = false; //write comfermation for Person+House
private boolean mediumDebugLevel = false; //write confermation for Town+County+Country
private boolean lowDebugLevel = false; //write confermation for continent
private int worldX = 800;
private int worldY = 600;
private int timerMin = 1;
private int timerMax = 2000;
private int timerStart = 500;
/** Creates a new instance of Settings */
public Settings() {
testString = "no change";
}
private void setTestString(String testString){
this.testString = testString;
}
private String getTestString(){
return testString;
}
public void setMaxRandomContinents(int n){
this.maxRandomContinents = n;
}
public int getMaxRandomContinents(){
return this.maxRandomContinents;
}
public void setMaxRandomCountries(int n){
this.maxRandomCountries = n;
}
public int getMaxRandomCountries(){
return this.maxRandomCountries;
}
public void setMaxRandomCounties(int n){
this.maxRandomCounties = n;
}
public int getMaxRandomCounties(){
return this.maxRandomCounties;
}
public void setMaxRandomTowns(int n){
this.maxRandomTowns = n;
}
public int getMaxRandomTowns(){
return this.maxRandomTowns;
}
public void setMaxRandomHouses(int n){
this.maxRandomHouses = n;
}
public int getMaxRandomHouses(){
return this.maxRandomHouses;
}
public void setMaxRandomPeople(int n){
this.maxRandomPeople = n;
}
public int getMaxRandomPeople(){
return this.maxRandomPeople;
}
public void setMaxWorldTraversal(int n){
this.maxWorldTraversal = n;
}
public int getMaxWorldTraversal(){
return this.maxWorldTraversal;
}
public void setMaxWorldHeight(int n){
this.maxWorldHeight = n;
}
public int getMaxWorldHeight(){
return this.maxWorldHeight;
}
public void setMinWorldHeight(int n){
this.minWorldHeight = n;
}
public int getMinWorldHeight(){
return this.minWorldHeight;
}
public void setMaxStartHeight(int n){
this.maxStartHeight = n;
}
public int getMaxStartHeight(){
return this.maxStartHeight;
}
public void setMinStartHeight(int n){
this.minStartHeight = n;
}
public int getMinStartHeight(){
return this.minStartHeight;
}
public void setSmoothness(Double n){
this.smoothness = n;
}
public Double getSmoothness(){
return this.smoothness;
}
public void setAlgorithm(int n){
this.algorithm = n;
}
public int getAlgorithm(){
return this.algorithm;
}
public void setSeaLevel(int n){
this.sealevel = n;
}
public int getSeaLevel(){
return this.sealevel;
}
public void setMountainLevel(int n){
this.mountainlevel = n;
}
public int getMountainLevel(){
return this.mountainlevel;
}
public void setRandomStartDiamondSquare(boolean n){
this.randomStartDiamondSquare = n;
}
public boolean getRandomStartDiamondSquare(){
return this.randomStartDiamondSquare;
}
public void setDiamondSquarePattern(int n){
this.diamondSquarePattern = n;
}
public int getDiamondSquarePattern(){
return this.diamondSquarePattern;
}
public void setDelayPerson(boolean n){
this.delayPerson = n;
}
public boolean getDelayPerson(){
return this.delayPerson;
}
public void setDelayHouse(boolean n){
this.delayHouse = n;
}
public boolean getDelayHouse(){
return this.delayHouse;
}
public void setDelayTown(boolean n){
this.delayTown = n;
}
public boolean getDelayTown(){
return this.delayTown;
}
public void setDelayCounty(boolean n){
this.delayCounty = n;
}
public boolean getDelayCounty(){
return this.delayCounty;
}
public void setDelayCountry(boolean n){
this.delayCountry = n;
}
public boolean getDelayCountry(){
return this.delayCountry;
}
public void setDelayContinent(boolean n){
this.delayContinent = n;
}
public boolean getDelayContinent(){
return this.delayContinent;
}
public void setDelayContinentValue(int n){
this.continentThreadDelay = n;
}
public int getDelayContinentValue(){
return this.continentThreadDelay;
}
public void setDelayCountryValue(int n){
this.countryThreadDelay = n;
}
public int getDelayCountryValue(){
return this.countryThreadDelay;
}
public void setDelayCountyValue(int n){
this.countyThreadDelay = n;
}
public int getDelayCountyValue(){
return this.countyThreadDelay;
}
public void setDelayTownValue(int n){
this.townThreadDelay = n;
}
public int getDelayTownValue(){
return this.townThreadDelay;
}
public void setDelayHouseValue(int n){
this.houseThreadDelay = n;
}
public int getDelayHouseValue(){
return this.houseThreadDelay;
}
public void setDelayPersonValue(int n){
this.personThreadDelay = n;
}
public int getDelayPersonValue(){
return this.personThreadDelay;
}
public void setHighDebugLevel(boolean n){
this.highDebugLevel = n;
}
public boolean getHighDebugLevel(){
return this.highDebugLevel;
}
public void setMediumDebugLevel(boolean n){
this.mediumDebugLevel = n;
}
public boolean getMediumDebugLevel(){
return this.mediumDebugLevel;
}
public void setLowDebugLevel(boolean n){
this.lowDebugLevel = n;
}
public boolean getLowDebugLevel(){
return this.lowDebugLevel;
}
public void setWorldX(int n){
this.worldX = n;
}
public int getWorldX(){
return this.worldX;
}
public void setWorldY(int n){
this.worldY = n;
}
public int getWorldY(){
return this.worldY;
}
public void setTimerMin(int n){
this.timerMin = n;
}
public int getTimerMin(){
return this.timerMin;
}
public void setTimerMax(int n){
this.timerMax = n;
}
public int getTimerMax(){
return this.timerMax;
}
public void setTimerStart(int n){
this.timerStart = n;
}
public int getTimerStart(){
return this.timerStart;
}
public int getPatternStartHeight(int n, int m){
return patterns[n][m];
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -