# Modifying a game: score, random, display

**URL:** <https://discourse.processing.org/t/modifying-a-game-score-random-display/22785>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [July 22, 2020, 8:41pm UTC](https://discourse.processing.org/t/modifying-a-game-score-random-display/22785 "2020-07-22T20:41:48Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [August 8, 2020, 10:55pm UTC](https://discourse.processing.org/t/modifying-a-game-score-random-display/22785/24 "2020-08-08T22:55:28Z")

</div>

I had actually started with your code and rewrote most of it for a personal challenge.

Here is an example of “time to live” for one button:

> [@Whack-A-Mole Game](https://discourse.processing.org/t/whack-a-mole-game/23113/8):
>
> Hello, I wrote an example that used an array of objects (balls) filling the canvas with different colors, radii, random locations and random time to live in a class to create these objects. I added the time to live last once everything else was working. There is a learning curve to doing this but worth it and can easily be updated. This is a very minimal example implementing “time to live” for one ball without a class. You can try to integrate it (or something similar) into an array of objec…

`:)`

---

_[View the full topic](https://discourse.processing.org/t/modifying-a-game-score-random-display/22785)._
