moved player drawing into its own function, fixed bug in runAI() that was occasionally causing exceptions