Math Range Error Python Code For Snake Games