Reworked the player_turn method to fix bugs related to invalid slots and occupied squares