- bgen.info
- Build.java
- Updates build list and checks through requirements to make sure that requirements of each object are somewhere in build order. Still need make Ordering methods.
- Struct.java
- Parent class for all structures. Constitutes get method which returns
Object[][]
.
- Parent class for all structures. Constitutes get method which returns
- Unit.java
- Parent class for all units. Constitutes get method which returns
Object[][]
.
- Parent class for all units. Constitutes get method which returns
- Upgrade.java
- Parent class for all upgrades. Constitutes get method which returns
Object[][]
.
- Parent class for all upgrades. Constitutes get method which returns
- Build.java
- bgen.game
- CurrentGame.java
- Instantiated game. Used to track resources and entities.
- GameEngine.java
- Game Initializor. Constitutes pre-game values for resources
- CurrentGame.java
- bgen.info.Race
- Layout for these objects are as follows:
public class Entity extends EntityType{ public Entity() { /* * objectAttribute is normally used in * Entity.produce. This takes only one Entity * where as objectAttributeArray * will accept more than one. */ Entity.objectAttribute = new AttributeEntity(); /* * objectAttributeArray is normally used * for the Entity.reqs attribute. * This takes more than one Entity, * but it is possible to use none or one. * Although this example only shows two * Entities, it can take an infinite amount. */ Entity.objectAttributeArray = new Object[]{new ObjectEntity1(), new ObjectEntity2()}; /* * resourceOrInteger is used for many * different attributes including, but not * limited to supply, minerals, gas, * and time. */ Entity.resourceOrInteger = resourceAttributeOrIntegerAttribute; /* * resourceAttributeArray is used when * a resource or integer needs multiple * values. This is used exclusively for * Upgrades. */ Entity.resourceAttributeArray = new int[]{resourceCost1, resourceCost2}; } }
-
Structs
- List of Structures. Each structure extends bgen.info.Struct.
- Attributes are as follows:
-
Structure
replacesEntity
-
Struct
replacesEntityType
-
Structure.reqs = new Object[]{new RequirementObject1(), new RequirementObject2()};
- Requirements for Structure to be built. Can be none, one, or many.
-
Structure.minerals = mineralCost;
- Mineral cost for Structure.
-
Structure.gas = gasCost;
- Gas cost for Structure.
-
Structure.time = timeToBuild;
- Time Structure takes to build.
-
-
Units
- List of Units. Each unit extends bgen.info.Unit.
- Attributes are as follows:
Uni
replacesEntity
Uni
replacesEntityType
Uni.produce = new ProducingObject();
- Object that produces Unit.
Uni.reqs = new Object[]{new RequirementObject1(), new RequirementObject2()};
- Requirements for Unit to be trained.
Uni.supply = supplyCost;
- Supply cost for Unit.
Uni.minerals = mineralCost;
- Mineral cost for Unit.
Uni.gas = gasCost;
- Gas cost for Unit.
Uni.time = timeToTrain;
- Time Unit takes to train.
-
Upgrades
- List of Upgrades. Each upgrade extends bgen.info.Upgrade.
- Attributes are as follows.
Upg
replacesEntity
Upgrade
replacesEntityType
Upg.produce = new ProducingObject();
- Object that produces Upgrade.
Upg.reqs = new Object[]{new RequirementObject1(), new RequirementObject2()};
- Requirements for Upgrade to be researched.
Upg.minerals = new int[]{mineralBaseCost, levelFactor};
- The first object in int[] is the Upgrade's base mineral cost. The second object is optional, and is only used if
Upg.levels
is more than one. This is the factor added to the base mineral cost for each level. For example, if the first level is researched, the cost ismineralBaseCost
. When the second upgrade is researched, the mineral cost ismineralBaseCost + levelFactor
. Level 3 mineral cost is equal tomineralBaseCost + (levelFactor * 2)
- The first object in int[] is the Upgrade's base mineral cost. The second object is optional, and is only used if
Upg.gas = new int[]{gasBaseCost, levelFactor};
- This int[] stores information for gasCost. It acts the same as
Upg.minerals
.
- This int[] stores information for gasCost. It acts the same as
- Upg.time = new int[]{timeBase, levelFactor};
- This int[] stores information for time acts the same as
Upg.minerals
andUpg.gas
.
- This int[] stores information for time acts the same as
Upg.levelReqs = new Object[]{new Level1Requirement(), new Level2Requirement(), new Level3Requirement()};
- This attribute is optional and is only necessary if
Upg.levels
is more than one.
- This attribute is optional and is only necessary if
Upg.levels = numOfLevels;
- This attribute is optional and is only necessary if
Upg
has more than one level. IfUpg.levels
is not declared, it defaults to 1.
- This attribute is optional and is only necessary if
-
Notifications
You must be signed in to change notification settings - Fork 0
ninja4826/BroodGen
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A Genetic Algorithm project to practice java and whatnot
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published