New player code, ready to be tested.