Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
267 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
package com.zarkonnen.spacegen; | ||
|
||
public enum Cataclysm { | ||
NOVA("The star of $name goes nova, scraping the planet clean of all life!"), | ||
VOLCANIC_ERUPTIONS("Massive volcanic eruptions on $name eradicate all life on the planet!"), | ||
AXIAL_SHIFT("A shift in the orbital axis of $name spells doom for all life on the planet!"), | ||
METEORITE_IMPACT("All life on $name is killed off by a massive asteroid impact!"), | ||
NANOFUNGAL_BLOOM("A nanofungal bloom consumes all other life on $name before itself dying from a lack of nutrients!"), | ||
PSIONIC_SHOCKWAVE("A psionic shockwave of unknown origin passes through $name, instantly stopping all life!"); | ||
NOVA("nova", "The star of $name goes nova, scraping the planet clean of all life!"), | ||
VOLCANIC_ERUPTIONS("series of volcanic eruptions", "Massive volcanic eruptions on $name eradicate all life on the planet!"), | ||
AXIAL_SHIFT("shift in the planet's orbital axis", "A shift in the orbital axis of $name spells doom for all life on the planet!"), | ||
METEORITE_IMPACT("massive asteroid impact", "All life on $name is killed off by a massive asteroid impact!"), | ||
NANOFUNGAL_BLOOM("nanofungal bloom", "A nanofungal bloom consumes all other life on $name before itself dying from a lack of nutrients!"), | ||
PSIONIC_SHOCKWAVE("psionic shockwave", "A psionic shockwave of unknown origin passes through $name, instantly stopping all life!"); | ||
|
||
final String name; | ||
final String desc; | ||
|
||
private Cataclysm(String desc) { | ||
private Cataclysm(String name, String desc) { | ||
this.name = name; | ||
this.desc = desc; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.zarkonnen.spacegen; | ||
|
||
public class Fossil implements Stratum { | ||
SpecialLifeform fossil; | ||
int fossilisationTime; | ||
Cataclysm cat; | ||
|
||
public Fossil(SpecialLifeform fossil, int fossilisationTime, Cataclysm cat) { | ||
this.fossil = fossil; | ||
this.fossilisationTime = fossilisationTime; | ||
this.cat = cat; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Fossils of " + fossil.name.toLowerCase() + " that went extinct in " + fossilisationTime + | ||
(cat == null ? "." : " due to a " + cat.name + "."); | ||
} | ||
|
||
@Override | ||
public int time() { return fossilisationTime; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.zarkonnen.spacegen; | ||
|
||
public class Names { | ||
static final String[] NTHS = {"Zeroth", "First", "Second", "Third", "Fourth", "Fifth", "Sixth", | ||
"Seventh", "Eigth", "Ninth", "Tenth", "Eleventh", "Twelfth", "Thirteenth", "Fourteenth"}; | ||
|
||
static String nth(int n) { | ||
if (n < NTHS.length) { return NTHS[n]; } | ||
return n + "."; | ||
} | ||
|
||
static final String[] COLORS = { "Red", "Green", "Blue", "Orange", "Yellow", "Black", "White", | ||
"Purple", "Grey" | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.zarkonnen.spacegen; | ||
|
||
public class Remnant implements Stratum { | ||
Population remnant; | ||
int collapseTime; | ||
Cataclysm cat; | ||
|
||
public Remnant(Population remnant, int extinctionTime, Cataclysm cat) { | ||
this.remnant = remnant; | ||
this.collapseTime = extinctionTime; | ||
this.cat = cat; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Remnants of a culture of " + remnant.type.name + " that collapsed" + | ||
(cat == null ? "" : " due to a " + cat.name) + " in " + collapseTime + "."; | ||
} | ||
|
||
@Override | ||
public int time() { return collapseTime; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.zarkonnen.spacegen; | ||
|
||
public class Ruin implements Stratum { | ||
Structure structure; | ||
int ruinTime; | ||
Cataclysm cat; | ||
|
||
public Ruin(Structure structure, int ruinTime, Cataclysm cat) { | ||
this.structure = structure; | ||
this.ruinTime = ruinTime; | ||
this.cat = cat; | ||
} | ||
|
||
@Override | ||
public int time() { return ruinTime; } | ||
|
||
@Override | ||
public String toString() { | ||
return "The ruins of a " + structure + ", destroyed in " + ruinTime + | ||
(cat == null ? "." : " by a " + cat.name + "."); | ||
} | ||
} |
Oops, something went wrong.