Phonegap version of game