To try this code on the desktop, simply download and extract the archive and:
To try it on Android, you need to set up a project with QtCreator, add Android kit and put this code on ProjectName/qml/ProjectName. You may also want to add a custom Androidmanifest.xml and to set:
to disable landscape mode on your phone. If you want to play the game in fullscreen mode, you should also add:
This code should also work on OSX, iOS, and Windows Phone but I've not tried yet.