Quantcast
Channel: Answers by "Graham-Dunnett"
Viewing all articles
Browse latest Browse all 959

Answer by Graham Dunnett

$
0
0
So think about it. To begin you have `paused` set to `false`. When you press the p key, your test at line 14 will pass, so you'll set `paused` to `true`. Then, at line 19, you test if the p key is pressed (it was) and if `paused` is `true` (it is). So you'll always set `paused` to `false` if the p key is pressed. So, at line 19 do an `else if`.

Viewing all articles
Browse latest Browse all 959

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>