implement test hooks and ostream operator for Player