Some code from an Android game I am developing