well, rulers were broken into dynasties, that would be father, then his son, the his son and so on. the eldest decedent would be ruler, if the eldest died, then the youngest, if the youngest died, a new pharaoh would rise to power, creating a new dynasty
hope that helps ya