Factor player code out of pandora package
Python 3 compatability