use proper check for playing
pep8 cleanup