How did soccer players survive in Thai cave?

The boys reportedly drank water dripping down the sides of the cave, ate snacks they had with them and were taught by their coach to meditate.