Getting the depth and player index automatically