Change Grid data structure to List #44

Closed
opened 2018-08-29 17:38:35 +00:00 by marty-oehme · 7 comments
marty-oehme commented 2018-08-29 17:38:35 +00:00 (Migrated from gitlab.com)

make the grid a list which gets accessed and changed through accessor utility method.

Perhaps make it its own class of CellMap which internally carries a list but can get accessed through an x,y coordinate.

Every cell thus is located through:

  • a 2-D coordinate
  • an index number
make the grid a list which gets accessed and changed through accessor utility method. Perhaps make it its own class of CellMap which internally carries a list but can get accessed through an x,y coordinate. Every cell thus is located through: * a 2-D coordinate * an index number
marty-oehme commented 2018-08-29 17:38:56 +00:00 (Migrated from gitlab.com)
created branch [`44-change-grid-data-structure-to-list`](https://gitlab.com/marty.oehme/cellular-automata/compare/master...44-change-grid-data-structure-to-list)
marty-oehme commented 2018-08-29 17:38:56 +00:00 (Migrated from gitlab.com)

mentioned in merge request !12

mentioned in merge request !12
marty-oehme commented 2018-08-29 18:36:05 +00:00 (Migrated from gitlab.com)

necessary methods:

  • get(x,y) | tests:
    • sad
    • bad
    • happy
  • set(x, y)
    • sad
    • bad
    • happy

nice to have methods:

  • row(y); -> returns whole row as its own list?
  • column(x); -> returns whole column as its own list?
  • respective forEach's as well?
necessary methods: * [x] get(x,y) | tests: - [x] sad - [x] bad - [x] happy * [x] set(x, y) - [x] sad - [x] bad - [x] happy nice to have methods: * [ ] row(y); -> returns whole row as its own list? * [ ] column(x); -> returns whole column as its own list? * [ ] respective forEach's as well?
marty-oehme commented 2018-08-30 08:03:39 +00:00 (Migrated from gitlab.com)

Implementation:

  • Replace all usages of List<List<Cell>> map to class Grid in Simulation
Implementation: * [ ] Replace all usages of `List<List<Cell>> map` to class `Grid` in `Simulation`
marty-oehme commented 2018-08-30 10:04:00 +00:00 (Migrated from gitlab.com)

closed via merge request !12

closed via merge request !12
marty-oehme commented 2018-08-30 10:04:21 +00:00 (Migrated from gitlab.com)

mentioned in commit 9c37f87045

mentioned in commit 9c37f87045bcd932a49f43e13e4c293fd6b270e8
marty-oehme commented 2018-08-31 07:27:34 +00:00 (Migrated from gitlab.com)

marked this issue as related to #50

marked this issue as related to #50
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: experiments/cellular-automata#44
No description provided.