# Game issues for christmas

**URL:** https://discourse.processing.org/t/game-issues-for-christmas/14780
**Category:** Coding Questions
**Created:** [October 18, 2019, 3:30pm UTC](https://discourse.processing.org/t/game-issues-for-christmas/14780 "2019-10-18T15:30:40Z")
**Posts on this page:** 1
**Showing post:** 51

<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: [October 20, 2019, 6:57pm UTC](https://discourse.processing.org/t/game-issues-for-christmas/14780/51 "2019-10-20T18:57:58Z")

</div>

my theory is that : you change state in this if clause.

Therefore when we reach the other  
if clause state is already changed and therefore  
the 2nd condition is also true.

(our idea was that state would stop the 2nd if from executing but this won’t work now (it’s because how your code is, never mind))

The `return` command immediately leaves the whole mousePressed function the hard way, so the 2nd if-clause can’t be reached. It will be reached next time you click the mouse though.

---

_[View the full topic](https://discourse.processing.org/t/game-issues-for-christmas/14780)._
