![]() ![]() LifeGrid is the JS implementation of GameOfLife that pretty much handles everything the server also handles. StructureTemplatePanel is to show building options for the user StructurePanel is used to display structure status for a client TeamPanel is used to display team details Panel is a general JSX component (div) that we treat as widget for UI elements. Server main() manages the Room instances and also processes socket input, mapping them to a player to invoke an action Structure abstract class buidls on StructureTemplate but requires a method for checking a structure's integrity (is it still active?) StructureTemplate includes a LifeTemplate and various other structure stats (cost, resourceRate - either income or upkeep, buildArea - how much it extends area you can build, visionArea - how much it shows you if we're doing fog of war) LifeTemplate represents a cell configuration "template" Vector2 is just a 2D Vector for positions ILifeGrid::step() advances the grid by one generation according to Conway's game of life rules.ILifeGrid::compareTemplate() returns the amount of cells that differ from the template.ILifeGrid::loadTemplate() for loading a template (cell configuration).ILifeGrid::setCell() for setting individual cells (probably to be private).ILifeGrid::getCell() for querying cells (determine if a structure is still active).ILifeGrid is the interface for implementing a LifeGrid (grid for Conway's game of life) Room::buildStructure() is used to figure out who.Room::processTick() handles updating the game state to advance a step. ![]() Room::initialize() is used to start a game (clear the board and setup player positions).Team is an actual player with resources and existing structures, but might have multiple operators aka Player Conway rts cyber project (but still being designed) Rough UML Diagram ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |