# Dino chrome game

**URL:** <https://discourse.processing.org/t/dino-chrome-game/36836>\
**Category:** Processing\
**Tags:** homework\
**Created:** [May 12, 2022, 1:03am UTC](https://discourse.processing.org/t/dino-chrome-game/36836 "2022-05-12T01:03:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmznam02](https://avatars.discourse-cdn.com/v4/letter/r/e36b37/32.png) [@rmznam02](https://discourse.processing.org/u/rmznam02)\
**Post date:** [May 12, 2022, 1:03am UTC](https://discourse.processing.org/t/dino-chrome-game/36836/1 "2022-05-12T01:03:36Z")

</div>

Hey, everyone.

I have a school project and I got this code, I need help to comment, I have to deliver it today before midnight, thanks for your help.

> <https://github.com/Maxdem28/dinogame-neural/blob/master/dinogame-neural.pde>

[rmznam@outlook.com](mailto:rmznam@outlook.com)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 12, 2022, 10:35am UTC](https://discourse.processing.org/t/dino-chrome-game/36836/2 "2022-05-12T10:35:23Z")

</div>

and what is your question?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 12, 2022, 11:20am UTC](https://discourse.processing.org/t/dino-chrome-game/36836/3 "2022-05-12T11:20:31Z")

</div>

Or is it a please do this for me?

- I suggest you order the classes so that they are at the end.  
(At the moment there are two functions after the last class.)

- I also recommend lines: //----- before setup and after draw()

- And lines // ====== before each class

- You can comment on important closing brackets } like  
`} // draw` or  
`} // class`

- player is not a good name. Better is `playerOrAI`

- Each function should have a comment what is does (first line)

- draw() is far too long. Normally you would make functions for concerns like displayPlayer or displayObstacle. Also, it would be cleaner when you had only once `if(playerOrAI==1) {...} else {...}` because now it occurs quite often

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [May 12, 2022, 11:21am UTC](https://discourse.processing.org/t/dino-chrome-game/36836/4 "2022-05-12T11:21:44Z")

</div>

> [@rmznam02](#):
>
> I need help to comment

Do you want to make instructions comments or what?
