diff --git a/data/semantic/rpg_command/test.csv b/data/semantic/rpg_command/test.csv new file mode 100644 index 0000000..c66fe14 --- /dev/null +++ b/data/semantic/rpg_command/test.csv @@ -0,0 +1,2 @@ +"utility","transfer","query","imperative","sentence" +1,0,0,0,"Hello" \ No newline at end of file diff --git a/data/semantic/rpg_command/train.csv b/data/semantic/rpg_command/train.csv new file mode 100644 index 0000000..2a9d387 --- /dev/null +++ b/data/semantic/rpg_command/train.csv @@ -0,0 +1,2 @@ +"look","transfer","query","imperative","sentence" +1,0,0,0,"Hello" \ No newline at end of file diff --git a/data/sim/emotions.json b/data/sim/emotions.json new file mode 100644 index 0000000..76d6d71 --- /dev/null +++ b/data/sim/emotions.json @@ -0,0 +1,50 @@ +[ + { + "valence" : 0.0, + "arousal" : 0.0, + "dominance" : 0.0, + "name" : "Neutral" + }, + { + "valence" : 1.0, + "arousal" : 0.0, + "dominance" : 0.0, + "name" : "Happy" + }, + { + "valence" : 1.0, + "arousal" : 1.0, + "dominance" : 0.0, + "name" : "Joy" + }, + { + "valence" : -0.5, + "arousal" : 0.5, + "dominance" : 0.3, + "name" : "Anger" + }, + { + "valence" : 0.5, + "arousal" : 0.75, + "dominance" : -0.1, + "name" : "Surprise" + }, + { + "valence" : -0.75, + "arousal" : 0.5, + "dominance" : 0.1, + "name" : "Digust" + }, + { + "valence" : -0.75, + "arousal" : 0.75, + "dominance" : -0.75, + "name" : "Fear" + }, + { + "valence" : -0.75, + "arousal" : 0.25, + "dominance" : -0.5, + "name" : "Sadness" + } +] \ No newline at end of file diff --git a/src/main/java/org/studiorailgun/Globals.java b/src/main/java/org/studiorailgun/Globals.java index a15293a..38d4d0a 100644 --- a/src/main/java/org/studiorailgun/Globals.java +++ b/src/main/java/org/studiorailgun/Globals.java @@ -7,6 +7,8 @@ import org.studiorailgun.ai.conversation.parser.bank.LemmaBank; import org.studiorailgun.ai.conversation.tracking.Conversation; import org.studiorailgun.ai.knowledge.CSVExport; import org.studiorailgun.ai.knowledge.KnowledgeWeb; +import org.studiorailgun.sim.space.World; +import org.studiorailgun.sim.character.Character; /** * Global variables @@ -23,6 +25,16 @@ public class Globals { */ public static Conversation conversation; + /** + * The simulation world + */ + public static World world; + + /** + * The player's character + */ + public static Character playerCharacter; + /** * Initializes the knowledge web */ diff --git a/src/main/java/org/studiorailgun/Main.java b/src/main/java/org/studiorailgun/Main.java index 66f4a8c..27183a6 100644 --- a/src/main/java/org/studiorailgun/Main.java +++ b/src/main/java/org/studiorailgun/Main.java @@ -1,5 +1,7 @@ package org.studiorailgun; +import org.studiorailgun.interact.GameLoop; + /** * The main class */ @@ -9,7 +11,7 @@ public class Main { * The main method */ public static void main(String[] args){ - AgentLoop.main(); + GameLoop.main(); } } diff --git a/src/main/java/org/studiorailgun/ai/conversation/command/CommandParser.java b/src/main/java/org/studiorailgun/ai/conversation/command/ConvCommandParser.java similarity index 85% rename from src/main/java/org/studiorailgun/ai/conversation/command/CommandParser.java rename to src/main/java/org/studiorailgun/ai/conversation/command/ConvCommandParser.java index b4565ef..852c180 100644 --- a/src/main/java/org/studiorailgun/ai/conversation/command/CommandParser.java +++ b/src/main/java/org/studiorailgun/ai/conversation/command/ConvCommandParser.java @@ -1,13 +1,14 @@ package org.studiorailgun.ai.conversation.command; -import org.studiorailgun.AgentLoop; import org.studiorailgun.ai.conversation.llm.LLMLoop; import org.studiorailgun.ai.knowledge.CSVExport; +import org.studiorailgun.interact.AgentLoop; +import org.studiorailgun.interact.GameLoop; /** * Parses player commands to execute */ -public class CommandParser { +public class ConvCommandParser { /** * Parses the input for commands. If a valid command is recognized, returns true. Otherwise returns false. @@ -18,6 +19,7 @@ public class CommandParser { if(input.equals("exit")){ LLMLoop.running = false; AgentLoop.running = false; + GameLoop.running = false; } else if(input.equals("s hypo")){ //save a response failing to consider a hypothetical } else if(input.equals("s q")){ //save a question diff --git a/src/main/java/org/studiorailgun/ai/conversation/llm/LLMLoop.java b/src/main/java/org/studiorailgun/ai/conversation/llm/LLMLoop.java index 626f30a..61fb0be 100644 --- a/src/main/java/org/studiorailgun/ai/conversation/llm/LLMLoop.java +++ b/src/main/java/org/studiorailgun/ai/conversation/llm/LLMLoop.java @@ -2,7 +2,7 @@ package org.studiorailgun.ai.conversation.llm; import java.util.Scanner; -import org.studiorailgun.ai.conversation.command.CommandParser; +import org.studiorailgun.ai.conversation.command.ConvCommandParser; import org.studiorailgun.kobold.KoboldPrinter; import org.studiorailgun.kobold.KoboldRequest; @@ -39,7 +39,7 @@ public class LLMLoop { //handle player statement prompt = scan.nextLine(); - if(CommandParser.parseCommands(prompt)){ + if(ConvCommandParser.parseCommands(prompt)){ continue; } convo.addStatement(new Statement(player, prompt)); diff --git a/src/main/java/org/studiorailgun/AgentLoop.java b/src/main/java/org/studiorailgun/interact/AgentLoop.java similarity index 76% rename from src/main/java/org/studiorailgun/AgentLoop.java rename to src/main/java/org/studiorailgun/interact/AgentLoop.java index a56ab8f..65ed1b3 100644 --- a/src/main/java/org/studiorailgun/AgentLoop.java +++ b/src/main/java/org/studiorailgun/interact/AgentLoop.java @@ -1,17 +1,13 @@ -package org.studiorailgun; +package org.studiorailgun.interact; import java.util.Scanner; +import org.studiorailgun.Globals; import org.studiorailgun.ai.conversation.ConvAI; -import org.studiorailgun.ai.conversation.command.CommandParser; +import org.studiorailgun.ai.conversation.command.ConvCommandParser; import org.studiorailgun.ai.conversation.tracking.Quote; public class AgentLoop { - - /** - * The size of the context available - */ - static final int CONTEXT_SIZE = 32 * 1024; /** * Controls whether the main parser loop is running @@ -34,7 +30,7 @@ public class AgentLoop { //handle player statement prompt = scan.nextLine(); - if(CommandParser.parseCommands(prompt)){ + if(ConvCommandParser.parseCommands(prompt)){ continue; } Quote response = ConvAI.simFrame(prompt); diff --git a/src/main/java/org/studiorailgun/interact/GameLoop.java b/src/main/java/org/studiorailgun/interact/GameLoop.java new file mode 100644 index 0000000..10227a6 --- /dev/null +++ b/src/main/java/org/studiorailgun/interact/GameLoop.java @@ -0,0 +1,48 @@ +package org.studiorailgun.interact; + +import java.util.Scanner; + +import org.studiorailgun.Globals; +import org.studiorailgun.ai.conversation.ConvAI; +import org.studiorailgun.ai.conversation.command.ConvCommandParser; +import org.studiorailgun.ai.conversation.tracking.Quote; +import org.studiorailgun.sim.character.gen.PlayerCharSourcer; +import org.studiorailgun.sim.space.gen.WorldGenerator; + +/** + * The game loop + */ +public class GameLoop { + + /** + * Controls whether the main parser loop is running + */ + public static boolean running = true; + + /** + * The main method + */ + public static void main(){ + Globals.init("web.json"); + Globals.world = WorldGenerator.generateWorld(); + Globals.playerCharacter = PlayerCharSourcer.getPlayerCharacter(); + + try (Scanner scan = new Scanner(System.in)) { + String prompt = ""; + + System.out.println("Game is ready.."); + + //actual main loop + while(running){ + + //handle player statement + prompt = scan.nextLine(); + if(ConvCommandParser.parseCommands(prompt)){ + continue; + } + Quote response = ConvAI.simFrame(prompt); + System.out.println(response.getRaw()); + } + } + } +} diff --git a/src/main/java/org/studiorailgun/sim/character/Character.java b/src/main/java/org/studiorailgun/sim/character/Character.java index 0251fa2..4e58414 100644 --- a/src/main/java/org/studiorailgun/sim/character/Character.java +++ b/src/main/java/org/studiorailgun/sim/character/Character.java @@ -1,8 +1,58 @@ package org.studiorailgun.sim.character; +import org.studiorailgun.sim.character.emotion.EmotionData; +import org.studiorailgun.sim.character.vis.CharacterAppearance; + /** * A reasoning entity being simulated in the game world */ public class Character { + + /** + * The id of the character + */ + int id; + /** + * The physical appearance of the character + */ + CharacterAppearance appearance; + + /** + * The emotional data for the character + */ + EmotionData emotions; + + /** + * Gets the appearance of the character + * @return The appearance of the character + */ + public CharacterAppearance getAppearance() { + return appearance; + } + + /** + * Sets the appearance of the character + * @param appearance The appearance of the character + */ + public void setAppearance(CharacterAppearance appearance) { + this.appearance = appearance; + } + + /** + * Gets the emotions of the character + * @return The emotions of the character + */ + public EmotionData getEmotions() { + return emotions; + } + + /** + * Sets the emotions of the character + * @param emotions The emotions of the character + */ + public void setEmotions(EmotionData emotions) { + this.emotions = emotions; + } + } diff --git a/src/main/java/org/studiorailgun/sim/character/emotion/EmotionData.java b/src/main/java/org/studiorailgun/sim/character/emotion/EmotionData.java new file mode 100644 index 0000000..a26c176 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/emotion/EmotionData.java @@ -0,0 +1,71 @@ +package org.studiorailgun.sim.character.emotion; + +/** + * Contains emotion data about the character + */ +public class EmotionData { + + /** + * How positive/negative the character is + */ + float valence; + + /** + * How aroused the character is + */ + float arousal; + + /** + * How dominant the character is + */ + float dominance; + + /** + * Gets the valence of the character + * @return The valence of the character + */ + public float getValence() { + return valence; + } + + /** + * Sets the valence of the character + * @param valence The valence of the character + */ + public void setValence(float valence) { + this.valence = valence; + } + + /** + * Gets the arousal of the character + * @return The arousal of the character + */ + public float getArousal() { + return arousal; + } + + /** + * Sets the arousal of the character + * @param arousal The arousal of the character + */ + public void setArousal(float arousal) { + this.arousal = arousal; + } + + /** + * Gets the dominance of the character + * @return The dominance of the character + */ + public float getDominance() { + return dominance; + } + + /** + * Sets the dominance of the character + * @param dominance The dominance of the character + */ + public void setDominance(float dominance) { + this.dominance = dominance; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/character/emotion/EmotionDef.java b/src/main/java/org/studiorailgun/sim/character/emotion/EmotionDef.java new file mode 100644 index 0000000..cb4014b --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/emotion/EmotionDef.java @@ -0,0 +1,84 @@ +package org.studiorailgun.sim.character.emotion; + +/** + * A definition of an emotion + */ +public class EmotionDef { + + /** + * The valence of the emotion + */ + float valence; + + /** + * The arousal of the emotion + */ + float arousal; + + /** + * The dominance of the emotion + */ + float dominance; + + /** + * The name of this emotion + */ + String name; + + /** + * Gets the valence of the emotion + * @return The valence of the emotion + */ + public float getValence() { + return valence; + } + + /** + * Sets the valence of the emotion + * @param valence The valence of the emotion + */ + public void setValence(float valence) { + this.valence = valence; + } + + /** + * Gets the arousal of the emotion + * @return The arousal of the emotion + */ + public float getArousal() { + return arousal; + } + + /** + * Sets the arousal of the emotion + * @param arousal The arousal of the emotion + */ + public void setArousal(float arousal) { + this.arousal = arousal; + } + + /** + * Gets the dominance of the emotion + * @return The dominance of the emotion + */ + public float getDominance() { + return dominance; + } + + /** + * Sets the dominance of the emotion + * @param dominance The dominance of the emotion + */ + public void setDominance(float dominance) { + this.dominance = dominance; + } + + /** + * Gets the name of this emotion definition + * @return The name of the emotion + */ + public String getName(){ + return name; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/character/gen/CharacterGenerator.java b/src/main/java/org/studiorailgun/sim/character/gen/CharacterGenerator.java new file mode 100644 index 0000000..bc1c829 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/gen/CharacterGenerator.java @@ -0,0 +1,19 @@ +package org.studiorailgun.sim.character.gen; + +import org.studiorailgun.sim.character.Character; + +/** + * Generates a character + */ +public class CharacterGenerator { + + /** + * Generates a character + * @return The character + */ + public static Character generateCharacter(){ + Character rVal = new Character(); + return rVal; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/character/gen/PlayerCharSourcer.java b/src/main/java/org/studiorailgun/sim/character/gen/PlayerCharSourcer.java new file mode 100644 index 0000000..8da5070 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/gen/PlayerCharSourcer.java @@ -0,0 +1,19 @@ +package org.studiorailgun.sim.character.gen; + +import org.studiorailgun.sim.character.Character; + +/** + * Sources the player character (ie either by prompting the player, loading from file, generating, etc) + */ +public class PlayerCharSourcer { + + /** + * Gets the player's character + * @return The player's character + */ + public static Character getPlayerCharacter(){ + Character rVal = new Character(); + return rVal; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/character/gen/params/CharacterGeneratorParams.java b/src/main/java/org/studiorailgun/sim/character/gen/params/CharacterGeneratorParams.java new file mode 100644 index 0000000..70cb1e5 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/gen/params/CharacterGeneratorParams.java @@ -0,0 +1,50 @@ +package org.studiorailgun.sim.character.gen.params; + +/** + * Parameters for the character generator + */ +public class CharacterGeneratorParams { + + /** + * The race of the character + */ + String race; + + /** + * The sex of the character + */ + String sex; + + /** + * Gets the race param + * @return The race + */ + public String getRace() { + return race; + } + + /** + * Sets the race param + * @param race The race param + */ + public void setRace(String race) { + this.race = race; + } + + /** + * Gets the sex param + * @return The sex param + */ + public String getSex() { + return sex; + } + + /** + * Sets the sex param + * @param sex The sex param + */ + public void setSex(String sex) { + this.sex = sex; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/character/vis/CharaEyes.java b/src/main/java/org/studiorailgun/sim/character/vis/CharaEyes.java new file mode 100644 index 0000000..a551698 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/vis/CharaEyes.java @@ -0,0 +1,31 @@ +package org.studiorailgun.sim.character.vis; + +/** + * A description of the physical characteristics of the eye of a character + */ +public class CharaEyes { + + /** + * The color of the eyes + */ + String color; + + /** + * Gets the color of the eyes + * @return The color of the eyes + */ + public String getColor() { + return color; + } + + /** + * Sets the color of the eyes + * @param color The color of the eyes + */ + public void setColor(String color) { + this.color = color; + } + + + +} diff --git a/src/main/java/org/studiorailgun/sim/character/vis/CharaHair.java b/src/main/java/org/studiorailgun/sim/character/vis/CharaHair.java new file mode 100644 index 0000000..e6796f9 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/vis/CharaHair.java @@ -0,0 +1,52 @@ +package org.studiorailgun.sim.character.vis; + +/** + * A description of the physical characteristics of the hair of a character + */ +public class CharaHair { + + /** + * The color of the hair + */ + String color; + + /** + * The style of the hair + */ + String style; + + /** + * Gets the color of the hair + * @return The color of the hair + */ + public String getColor() { + return color; + } + + /** + * Sets the color of the hair + * @param color The color of the hair + */ + public void setColor(String color) { + this.color = color; + } + + /** + * Gets the style of the hair + * @return The style of the hair + */ + public String getStyle() { + return style; + } + + /** + * Sets the style of the hair + * @param style The style of the hair + */ + public void setStyle(String style) { + this.style = style; + } + + + +} diff --git a/src/main/java/org/studiorailgun/sim/character/vis/CharaHead.java b/src/main/java/org/studiorailgun/sim/character/vis/CharaHead.java new file mode 100644 index 0000000..2f5bfb5 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/vis/CharaHead.java @@ -0,0 +1,52 @@ +package org.studiorailgun.sim.character.vis; + +/** + * A description of the physical characteristics of the head of a character + */ +public class CharaHead { + + /** + * The description of the eyes + */ + CharaEyes eyes; + + /** + * The description of the hair + */ + CharaHair hair; + + /** + * Gets the eye data + * @return The eye data + */ + public CharaEyes getEyes() { + return eyes; + } + + /** + * Sets the eye data + * @param eyes The eye data + */ + public void setEyes(CharaEyes eyes) { + this.eyes = eyes; + } + + /** + * Gets the hair data + * @return The hair data + */ + public CharaHair getHair() { + return hair; + } + + /** + * Sets the hair data + * @param hair The hair data + */ + public void setHair(CharaHair hair) { + this.hair = hair; + } + + + +} diff --git a/src/main/java/org/studiorailgun/sim/character/vis/CharacterAppearance.java b/src/main/java/org/studiorailgun/sim/character/vis/CharacterAppearance.java new file mode 100644 index 0000000..5069a02 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/character/vis/CharacterAppearance.java @@ -0,0 +1,75 @@ +package org.studiorailgun.sim.character.vis; + +/** + * Container for the appearance of a character + */ +public class CharacterAppearance { + + /** + * The height of the character + */ + float height; + + /** + * The weight of the character + */ + float weight; + + /** + * Describes the head of the character + */ + CharaHead head; + + /** + * Gets the height of the character + * @return The height of the character + */ + public float getHeight() { + return height; + } + + /** + * Sets the height of the character + * @param height The height of the character + */ + public void setHeight(float height) { + this.height = height; + } + + /** + * Gets the weight of the character + * @return The weight of the character + */ + public float getWeight() { + return weight; + } + + /** + * Sets the weight of the character + * @param weight The weight of the character + */ + public void setWeight(float weight) { + this.weight = weight; + } + + /** + * Gets the appearance data of the head of the character + * @return The appearance data of the head of the character + */ + public CharaHead getHead() { + return head; + } + + /** + * Sets the appearance data of the head of the character + * @param head The appearance data of the head of the character + */ + public void setHead(CharaHead head) { + this.head = head; + } + + + + + +} diff --git a/src/main/java/org/studiorailgun/sim/item/Item.java b/src/main/java/org/studiorailgun/sim/item/Item.java new file mode 100644 index 0000000..11f78c0 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/item/Item.java @@ -0,0 +1,34 @@ +package org.studiorailgun.sim.item; + +/** + * An item + */ +public class Item { + + /** + * The id of the item + */ + int id; + + /** + * The type of item + */ + String type; + + /** + * Gets the type of the item + * @return The type of the item + */ + public String getType() { + return type; + } + + /** + * Sets the type of the item + * @param type The type of the item + */ + public void setType(String type) { + this.type = type; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/space/Location.java b/src/main/java/org/studiorailgun/sim/space/Location.java new file mode 100644 index 0000000..f696065 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/space/Location.java @@ -0,0 +1,64 @@ +package org.studiorailgun.sim.space; + +import java.util.LinkedList; +import java.util.List; + +import org.studiorailgun.sim.character.Character; +import org.studiorailgun.sim.item.Item; + +/** + * An area contains characters, items, etc. + * It can also contain other areas recursively. + */ +public class Location { + + /** + * The id of the location + */ + int id; + + /** + * The characters currently in this region + */ + transient List chars = new LinkedList(); + + /** + * The items in the location + */ + transient List items = new LinkedList(); + + /** + * Gets the characters in this location + * @return The characters in this location + */ + public List getChars() { + return chars; + } + + /** + * Sets the list of characters in this location + * @param chars The list of characters in this location + */ + public void setChars(List chars) { + this.chars = chars; + } + + /** + * Gets the list of items in this location + * @return The list of items in this location + */ + public List getItems() { + return items; + } + + /** + * Sets the list of items in this location + * @param items The list of items in this location + */ + public void setItems(List items) { + this.items = items; + } + + + +} diff --git a/src/main/java/org/studiorailgun/sim/space/Region.java b/src/main/java/org/studiorailgun/sim/space/Region.java new file mode 100644 index 0000000..a2020bb --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/space/Region.java @@ -0,0 +1,63 @@ +package org.studiorailgun.sim.space; + +import java.util.LinkedList; +import java.util.List; + +/** + * A recursive tree of regions that contain locations at their leaves + */ +public class Region { + + /** + * The child reglions of this region + */ + transient List children = new LinkedList(); + + /** + * The location data for this leaf node + */ + Location leaf; + + /** + * Gets the child regions of this region + * @return The list of child regions + */ + public List getChildren() { + return children; + } + + /** + * Sets the list of child regions of this region + * @param children The new list of child regions + */ + public void setChildren(List children) { + this.children = children; + } + + /** + * Gets the leaf location of this region + * @return The leaf location of this region + */ + public Location getLeaf() { + return leaf; + } + + /** + * Sets the leaf location of this region + * @param leaf The leaf location of this region + */ + public void setLeaf(Location leaf) { + this.leaf = leaf; + } + + /** + * Adds a child region + * @param child The child region + */ + public void addChild(Region child){ + children.add(child); + } + + + +} diff --git a/src/main/java/org/studiorailgun/sim/space/World.java b/src/main/java/org/studiorailgun/sim/space/World.java new file mode 100644 index 0000000..75ac450 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/space/World.java @@ -0,0 +1,29 @@ +package org.studiorailgun.sim.space; + +/** + * Top level spatial container + */ +public class World { + + /** + * The top level region + */ + Region region; + + /** + * Gets the top level region of this world + * @return The top level region of this world + */ + public Region getRegion() { + return region; + } + + /** + * Sets the top level region of this world + * @param region The top level region of this world + */ + public void setRegion(Region region) { + this.region = region; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/space/gen/BuildingGenerator.java b/src/main/java/org/studiorailgun/sim/space/gen/BuildingGenerator.java new file mode 100644 index 0000000..799905e --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/space/gen/BuildingGenerator.java @@ -0,0 +1,20 @@ +package org.studiorailgun.sim.space.gen; + +import org.studiorailgun.sim.space.Region; + +/** + * Generates buildings + */ +public class BuildingGenerator { + + /** + * Generates a building + * @return The building region + */ + public static Region generateBuilding(){ + Region rVal = new Region(); + + return rVal; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/space/gen/TownGenerator.java b/src/main/java/org/studiorailgun/sim/space/gen/TownGenerator.java new file mode 100644 index 0000000..f0efe82 --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/space/gen/TownGenerator.java @@ -0,0 +1,23 @@ +package org.studiorailgun.sim.space.gen; + +import org.studiorailgun.sim.space.Region; + +/** + * Generates a town + */ +public class TownGenerator { + + /** + * Generates a town + * @return A town + */ + public static Region generateTown(){ + Region rVal = new Region(); + + Region building = new Region(); + rVal.addChild(building); + + return rVal; + } + +} diff --git a/src/main/java/org/studiorailgun/sim/space/gen/WorldGenerator.java b/src/main/java/org/studiorailgun/sim/space/gen/WorldGenerator.java new file mode 100644 index 0000000..935138d --- /dev/null +++ b/src/main/java/org/studiorailgun/sim/space/gen/WorldGenerator.java @@ -0,0 +1,20 @@ +package org.studiorailgun.sim.space.gen; + +import org.studiorailgun.sim.space.World; + +/** + * Generates a world + */ +public class WorldGenerator { + + /** + * Generates a world + * @return The world + */ + public static World generateWorld(){ + World rVal = new World(); + + return rVal; + } + +}