# Creating Snake Game

**URL:** <https://discourse.processing.org/t/creating-snake-game/14954>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [October 26, 2019, 1:48pm UTC](https://discourse.processing.org/t/creating-snake-game/14954 "2019-10-26T13:48:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [October 26, 2019, 2:30pm UTC](https://discourse.processing.org/t/creating-snake-game/14954/4 "2019-10-26T14:30:51Z")

</div>

-a- actually a

```auto
  appleimg.resize(29,29);

```

in setup and a

```auto
 if ( apple[i] ) image(appleimg,xi+1,yi+1);

```

looks best here.

* * *

-b- yes you need a random set of a apple position?

```auto
apple[(int)random(many)] = true;

```

 ![applegrid](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/be5e9ac6074aae56a18735909097870d2649c7d9.png)

---

_[View the full topic](https://discourse.processing.org/t/creating-snake-game/14954)._
