Separated player code into its own class