# Converting coding challenge 'Self-avoiding walk backtracing' from p5.js to Processing (Java)

**URL:** <https://discourse.processing.org/t/converting-coding-challenge-self-avoiding-walk-backtracing-from-p5-js-to-processing-java/35047>\
**Category:** Coding Questions\
**Created:** [February 8, 2022, 7:34pm UTC](https://discourse.processing.org/t/converting-coding-challenge-self-avoiding-walk-backtracing-from-p5-js-to-processing-java/35047 "2022-02-08T19:34:23Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [June 25, 2022, 1:52am UTC](https://discourse.processing.org/t/converting-coding-challenge-self-avoiding-walk-backtracing-from-p5-js-to-processing-java/35047/21 "2022-06-25T01:52:15Z")

</div>

Python is now a full browser client language w/ PyScript:

> **[Pyscript.net](https://pyscript.net/)**
>
> Run Python code in your HTML.

So again I couldn’t resist converting my previous RapydScript sketch “Self Avoiding Walk II” to PyScript.

I’ve also added Python type hints to the whole code:

> **[PEP 483 – The Theory of Type Hints | peps.python.org](https://peps.Python.org/pep-0483/)**
>
> Python Enhancement Proposals (PEPs)

All 3 JS Processing flavors run on PyScript just like CoffeeScript & RapydScript previous versions:

https://Glitch.com/embed/#!/self-avoiding-walk-ii-pyscript?path=app/sketch.py&previewSize=0&sidebarCollapsed=true

You can [click here](https://api.glitch.com/project/download/?authorization=3d2d3e71-2277-421f-9d6a-38d0f41b0522&projectId=3dc3a6ae-9818-441a-8f7e-b1d50e7199c3) to download the full sketch so you can edit & run it somewhere else.  
And go to the link below to view it fullscreen:

- [https://Self-Avoiding-Walk-II-PyScript.Glitch.me/](https://Self-Avoiding-Walk-II-PyScript.Glitch.me/)

---

_[View the full topic](https://discourse.processing.org/t/converting-coding-challenge-self-avoiding-walk-backtracing-from-p5-js-to-processing-java/35047)._
