As I mentioned elsewhere, the learning curve for Hacked is probably a bit steep for new coders. I didn’t just want to give you the answers outright. I’ve included hints to help where you might get stuck, all wrapped in spoiler tags. Teach a man (or woman) to fish! I’ve also included comments in the code blocks, which you can’t do in the app, but may help those who are just starting out with coding. Ignore them when typing them into the hackpad.
Note that while I tend to use the keyword “return” for better readability/understanding, you don’t always need it when the final action is to output your answer, which will save you some keystrokes and score you more points.
[toc heading_levels=”2″]
Draw
[spoiler title=”Hint 1″][/spoiler]
[spoiler title=”Code”]
[code lang=”hack”]draw(input[0],input[1]);
[/code]
[/spoiler]
One thought to “Hacked app code solutions – Chapter 10 – Retirement”
I think this chapter could be better used to teach fundamentals of writing a game. Killer Robot was so dificult because of the Match 2 challenge, and then the next two chapters were too simple.
But I really enjoyed the game and I’m up to beat the extra chapters and making my own games. Could someone give tips on how to make the games? It appears that the code is executed every frame. How to make my variables persist between frames? Please help