-
Notifications
You must be signed in to change notification settings - Fork 0
/
World.cs
187 lines (165 loc) · 4.8 KB
/
World.cs
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace gurpsmoontest
{
public class World
{
private int worldType;
private double atmomass;
private int hydrocoeff;//as multiple of 10% of surface
private int surfacetemp;//in kelvins
private double blackbody;//in kelvins
private double density1;//Earths
private double density2;//g per cc
private double diameter;//in multiples of the diameter of earth
private double diameter2;//in miles
private double surfacegravity;//in G
private double mass;//in Earths
private double pressure;//in atm
private World[] sats;//array to hold planet's moons
public World()
{//initialize all values to zero for safety
worldType = 0;
atmomass = 0;
hydrocoeff = 0;
surfacetemp = 0;
blackbody = 0;
density1 = 0;
density2 = 0;
diameter = 0;
diameter2 = 0;
surfacegravity = 0;
mass = 0;
pressure = 0;
}
// getters and setters for ALL THE THINGS
public void setType(int x)
{
this.worldType = x;
}
public int getType() {
return this.worldType;
}
public string getTypeName()
{
switch (this.worldType) {
case 0:
return "Tiny Ice";
case 1:
return "Tiny Sulfur";
case 2:
return "Tiny Rock";
case 3:
return "Small Hadean";
case 4:
return "Small Ice";
case 5:
return "Small Rock";
case 6:
return "Standard Hadean";
case 7:
return "Standard Ammonia";
case 8:
return "Standard Greenhouse";
case 9:
return "Standard Cthonian";
case 10:
return "Standard Garden";
case 11:
return "Standard Ocean";
case 12:
return "Standard Ice";
case 13:
return "Large Ammonia";
case 14:
return "Large Greenhouse";
case 15:
return "Large Cthonian";
case 16:
return "Large Garden";
case 17:
return "Large Ocean";
case 18:
return "Large Ice";
case 19:
return "Gas Giant";
default:
return "Failed";
}
}
public void setAtmoMass(double x)
{
this.atmomass = x;
}
public double getAtmoMass()
{
return this.atmomass;
}
public void setHydro(int x) {
this.hydrocoeff = x*10;
}
public int getHydro() {
return hydrocoeff;
}
public void setSurfaceTemp(int x)
{
this.surfacetemp = x;
}
public int getSurfaceTemp()
{
return this.surfacetemp;
}
public void setBlackBody(double x) {
this.blackbody = x;
}
public double getBlackBody()
{
return this.blackbody;
}
public void setEarthDensity(double x) {
this.density1 = x;
}
public double getEarthDensity() {
return this.density1;
}
public void setMetricDensity(double x) {
this.density2 = x;
}
public double getMetricDensity()
{
return this.density2;
}
public void setEarthsDiameter(double x) {
this.diameter = x;
}
public double getEarthsDiameter() {
return this.diameter;
}
public void setMilesDiameter(double x) {
this.diameter2 = x;
}
public double getMilesDiameter() {
return this.diameter2;
}
public void setSurfaceGravity(double x) {
this.surfacegravity = x;
}
public double getSurfaceGravity() {
return this.surfacegravity;
}
public void setMass(double x) {
this.mass = x;
}
public double getMass() {
return this.mass;
}
public void setPressure(double x) {
this.pressure = x;
}
public double getPressure() {
return this.pressure;
}
}
}