45e8f01acb
Move Render Methods into SimulationService
2018-10-18 14:41:57 +02:00
58971016da
Remove ConfigurationService
...
Replaced with direct access to both EngineService and SimulationService.
2018-10-18 14:23:07 +02:00
99ead8691b
Make gridSize in Services pass correct signature
...
Both need to conform to Point<int> to be accepted by the engine.
2018-10-18 12:29:46 +02:00
7729da3a40
Split ConfigurationService to use SimulationService
...
Methods concerning engine make use of EngineService, those concerning grid and patterns make use of SimulationService.
2018-10-18 12:16:47 +02:00
6b4786fdd0
Add SimulationService to controls
...
Will eventually attach to the Simulation directly without first going through Engine. For now just redirects calls to EngineService to keep functions intact.
2018-10-18 12:05:02 +02:00
72ce25a806
Rename Controls component variable accessing engine
2018-10-18 11:59:36 +02:00
17697070ee
Move ControlService tasks into EngineService
...
All ControlService was used for was a redirection to the engine service. This will be further split up in the future into more logical units of responsibility.
2018-10-18 11:58:38 +02:00
b37487a222
Merge branch '53-encapsulate-ruleset-patterns-in-separate-data-structure' into 'master'
...
Resolve "Encapsulate Ruleset, Patterns in separate Data Structure"
Closes #53
See merge request marty.oehme/cellular-automata!14
2018-10-18 09:35:12 +00:00
4f92c69a82
Rename Simulation function adding random patterns
...
Rename from addPattern to addRandomPattern to more clearly signify its purpose.
2018-10-18 11:32:00 +02:00
f1399064a2
Fix Simulation using RuleSet range for neighbor checks
2018-10-18 11:30:14 +02:00
e13962f371
Shorten RuleSet variable for their checked range
...
Range is self-explanatory and not as confusing as checkRange.
2018-10-18 11:29:55 +02:00
0aa3df30b4
Extract CellPattern and GameOfLife into own files
2018-10-18 11:27:44 +02:00
fbdf114fed
Move RuleSet to its own directory
2018-10-18 11:21:18 +02:00
4f63947ab9
Delete unused Cell and Rule Classes
...
They were used under the old system of every
gridspace being its own cell data structure with its own rules to observe.
Replaced by the RuleSet class. Cell has vanished in favor
of simple boolean values filling the grid.
2018-10-18 11:20:41 +02:00
c3244b085e
Fix single steps not updating simulation
2018-10-18 11:04:23 +02:00
de1aa46743
Separate Simulation calculating updates and merging
...
Simulation updates were one step of calculation and merging the calculations into the map in one function.
Separating the two allows checking for a new update without affecting the grid, allows passing the last Update around and allows custom changes to the grid by passing changes to the merge function that were not derived from the update function.
2018-10-18 10:58:06 +02:00
e16085153a
Rename Simulation in Engine Object
2018-10-18 09:59:26 +02:00
bac65ef116
Remove unnecessary pattern parameters
2018-10-18 09:57:08 +02:00
6d7120650f
Add Special Patterns to RuleSet
2018-10-17 21:08:55 +02:00
e6e82f78f2
Remove unnecessary Switch Case in Simulation
2018-10-17 21:07:48 +02:00
9b2b5f3e55
Remove unnecessary Simulation variables
2018-10-17 21:00:14 +02:00
27d4879b1b
Extract RuleSet Class from Simulation
2018-10-17 20:58:04 +02:00
07f176be3e
Merge branch '43-add-statechange-data-structure' into 'master'
...
Resolve "Add StateChange data structure"
Closes #43
See merge request marty.oehme/cellular-automata!13
2018-10-16 16:23:29 +00:00
245d9a22c2
Remove Cell Data Structure
...
Cells are only boolean values of true or false for now.
2018-10-16 18:21:21 +02:00
71f4df85af
Refactor Simulation to be List of dumb cells
...
Cells are now only an empty struct, they carry no information beyond needing to be re-rendered. All Simulation logic is handled in the Simulation Class.
2018-10-15 17:28:09 +02:00
08155b70a5
Fix Pausing after every Update
...
Updates would pause when any change has happened, not when no change has happened.
2018-10-15 17:16:09 +02:00
c50e92fb19
Add simple stateChanges map into Simulation
2018-10-02 14:55:39 +02:00
9c37f87045
Merge branch '44-change-grid-data-structure-to-list' into 'master'
...
Resolve "Change Grid data structure to List"
Closes #44
See merge request marty.oehme/cellular-automata!12
2018-08-30 10:03:59 +00:00
a324d52df5
Fix Simulation Neighbor Propagation
2018-08-30 12:03:23 +02:00
b95d39d2b4
Fix not carrying width and height in Simulation
2018-08-30 10:58:55 +02:00
227357a745
Implement new Grid into Simulation
2018-08-30 10:57:14 +02:00
2dc1d7fecd
Add Grid.fill constructor
...
Will completely fill the grid with the value passed in.
2018-08-30 10:32:34 +02:00
eef7a23c8f
Regroup Instantiation tests
2018-08-30 10:17:31 +02:00
fb481669ed
Add Coordinates setter
...
Sets the corresponding element to the parameter value passed in. Checks against the grid size constraints beforehand and throws RangeError if outside of constraints. Preferred method to set
element via coordinates.
2018-08-30 10:02:29 +02:00
5725757aa0
Add Coordinate getter documentation
2018-08-30 09:55:25 +02:00
5a72783d57
Add .toCoordinates() method to grid
...
Calculates the 2-D array coordinates from the corresponding list index passed in. Relies on grid width to calculate coordinates. Does not check against grid size constraints.
2018-08-30 09:53:05 +02:00
6c3fcbe7b0
Add .get method for coordinate element retrieval to grid
...
Coordinates passed in access the correct index in the internal list.
2018-08-30 09:43:46 +02:00
46b11bc33b
Add dart_test.yaml file to suppress tag warnings
...
tags are added in the file without any special options
2018-08-30 09:42:29 +02:00
3f939601b3
Add toIndex method
...
can be used to get the correct index from coordinates passed in. Will only calculate the index, not take into consideration any grid size constraints etc.
2018-08-30 09:41:43 +02:00
8865af4878
Add tags to Instantiation tests
2018-08-30 09:36:57 +02:00
b0e67d9f85
Add getter and setter methods for wrapper
...
!!Need testing
2018-08-29 22:13:13 +02:00
27ef72014e
Add simple Grid - List Wrapper Data Structure
2018-08-29 22:12:19 +02:00
0c487f3427
Rename Grid to Simulation
...
in order to craft an actual grid data structure
2018-08-29 20:13:24 +02:00
7db2e73f53
Merge branch '37-make-grid-size-configurable' into 'master'
...
Resolve "Make Grid Size configurable"
Closes #38 , #39 , and #37
See merge request marty.oehme/cellular-automata!10
2018-08-28 07:45:43 +00:00
b1221c7c84
Add Grid Size Input to Configuration Bar
...
Fixes #37
2018-08-27 23:04:02 +02:00
800c85d14f
Fix wrong variable being accessed by controls_component
2018-08-27 23:03:13 +02:00
3a1ba1c1e9
Fix Wrong ControlService being provided to Angular
2018-08-27 23:02:48 +02:00
b6919cff6b
Move Canvas setting to configuration service
...
Fix #39
2018-08-27 20:56:33 +02:00
a92b864dfa
Extract EngineService into separate service
2018-08-27 20:50:12 +02:00
04d61bfa02
Error out on bad gridsize input
2018-08-27 20:18:19 +02:00