# Selecting a number from an array, only allowing certain numbers to follow

**URL:** https://discourse.processing.org/t/selecting-a-number-from-an-array-only-allowing-certain-numbers-to-follow/13951
**Category:** Coding Questions
**Created:** [September 12, 2019, 5:51pm UTC](https://discourse.processing.org/t/selecting-a-number-from-an-array-only-allowing-certain-numbers-to-follow/13951 "2019-09-12T17:51:13Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [September 12, 2019, 10:29pm UTC](https://discourse.processing.org/t/selecting-a-number-from-an-array-only-allowing-certain-numbers-to-follow/13951/4 "2019-09-12T22:29:21Z")

</div>

You might also be interested in the tiled model of the Wave Collapse Function – the algorithm is quite complex, but it takes a list of tiles and connections (exactly like you specify above) and then generates a solution – the solving process can also be animated. See the “tiled” section partway down in this discussion:

- ["Wave Collapse Function" algorithm in Processing](https://discourse.processing.org/t/wave-collapse-function-algorithm-in-processing/12983)

---

_[View the full topic](https://discourse.processing.org/t/selecting-a-number-from-an-array-only-allowing-certain-numbers-to-follow/13951)._
