How can i make it so that when there is only 1 player left the game will end

please please search before you post