![](https://lh4.googleusercontent.com/-Fw5eCR3MM90/UyiM0wXwpcI/AAAAAAAAKVA/R6xgdjdqqj8/s320/Screenshot_2014-03-18-13-11-35.png)
This project follows an earlier one in which I used the Canvas DrawCircle block to fill circles in a grid.
The problem with that algorithm was that every grid space was scanned to determine whether it should be filled or erased.
That means that the larger the grid the slower the updates to the screen.
The algorithm used in this project uses an optimization that only looks at the active 'stars' on the grid 'space' and their immediate surrounding spaces.
In addition, if a star's location is already in one of the lists that tracks active stars it only needs to be scanned one time.
The user can create patterns with this project and maintain a list of their favorite patterns.
Adding a new pattern to the favorites list in the app is as easy as touching the screen to add and remove stars in the pattern until you get it right, giving the pattern a name and touching the add-to-favorites icon.
The new pattern will appear at the top of the favorites list.
You also can add to the built-in ListPicker of patterns which you will find in the GameSCR.Initialize event block.
See attached project.
Try:
8 stars in a vertical line
---
hAPPy INVENTORing!