# Train Tracks with p5.js

**URL:** https://discourse.processing.org/t/train-tracks-with-p5-js/43190
**Category:** Gallery
**Created:** [November 11, 2023, 5:33pm UTC](https://discourse.processing.org/t/train-tracks-with-p5-js/43190 "2023-11-11T17:33:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [November 11, 2023, 5:33pm UTC](https://discourse.processing.org/t/train-tracks-with-p5-js/43190/1 "2023-11-11T17:33:19Z")

</div>

I don’t know about other countries but here in the UK Train Tracks is a popular puzzle that appears in many newspapers.

This sketch provides an endless supply of randomly generated 6x6 Train Track puzzles that are guaranteed to be solvable. I plan to use this as the basis for a larger Train Tracks project for my website which will include

- variable grid sizes from 6x6 to 15x15
- user select minimum % of squares that have tracks
- unlimited undo
- way-points (definable undo positions)
- proper GUI
- user supplied puzzles

In the meantime I hope you enjoy solving the puzzles 😄

https://openprocessing.org/sketch/2082162/embed/

---

<div class="post-metadata">

### Author: ![everythingability](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/everythingability/32/937_2.png) [@everythingability](https://discourse.processing.org/u/everythingability)
#### Post date: [November 17, 2023, 7:51pm UTC](https://discourse.processing.org/t/train-tracks-with-p5-js/43190/2 "2023-11-17T19:51:10Z")

</div>

Which newspapers you reading? Never ever seen one.

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [November 18, 2023, 9:10am UTC](https://discourse.processing.org/t/train-tracks-with-p5-js/43190/3 "2023-11-18T09:10:05Z")

</div>

The following newspapers have published Train Track puzzles either in the paper or in separate compilations

The Times  
The Telegraph  
The Guardian  
Daily Mail  
My local weekly

I don’t know about the red-tops but I doubt it 😉

---

<div class="post-metadata">

### Author: ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)
#### Post date: [November 18, 2023, 5:33pm UTC](https://discourse.processing.org/t/train-tracks-with-p5-js/43190/4 "2023-11-18T17:33:26Z")

</div>

You could make a daily puzzle out if this, in the line of Wordle.  
(But then you would need setting a cookie to mark the puzzle as “done”).

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [December 14, 2023, 4:07pm UTC](https://discourse.processing.org/t/train-tracks-with-p5-js/43190/5 "2023-12-14T16:07:51Z")

</div>

**Train Tracks (Full Version)**

The OpenProcessing version of Train Tracks (embedded in first post) was work in progress and had a number of issues which needed to be resolved.

So I have finally finished the final version of Train Tracks which you can play [here](http://www.lagers.org.uk/gallery/gy-traintracks/gy-index.html). The puzzle starts with a 6x6 grid but you can edit the settings to get more challenging puzzles. Enjoy 😀
