Hacked App – plus code solutions

I’ve found this little Android app called Hacked, while searching for coding games for my eldest son. This would be too advanced for him, but it’s certainly passed the time for me on my commutes.

Hacked is a great little coding game/app featuring a story mode and puzzle packs. You can also use it to code a virtual robot or your own game which you can then make available in the Hacked store.

You get scored based on coding mistakes, elegant code, and time it took to write. You can then compare your score to other Twitter friends, or on a global leaderboard.

It’s not particularly intuitive for beginners I’d have thought, as the learning curve is a little too steep. There are also some challenges in later levels that I struggled with. The logic I am fine with, it tends to be around what functions are available, e.g. converting strings to integers and back again.

I’ve started to post a few of my solutions, which are linked to below.

I also went to the trouble of creating a SyntaxHighlighter plugin specifically for “H” so that the code samples have a similar colour to what you’d see in the hackpad app itself. If you plan to blog your own H based scripts, you might want to grab that here: https://wordpress.org/plugins/syntaxhighlighter-evolved-h-brush/

More details about the app here: http://www.hackedapp.com/

Download from the Google Play store: https://play.google.com/store/apps/details?id=com.hackedapp

Story mode solutions

As I mentioned above, the learning curve 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 need it when it’s the final action of your code, which will save you some keystrokes and score you more points.

18 thoughts on “Hacked App – plus code solutions

Leave a comment

Your email address will not be published. Required fields are marked *

  • Facebook
  • Google+
  • LinkedIn
  • Twitter
  • YouTube
  • IMDb