Commit graph

8 commits

Author SHA1 Message Date
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
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
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
27ef72014e Add simple Grid - List Wrapper Data Structure 2018-08-29 22:12:19 +02:00