how to run for president
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#gotta be insane to do this, and american and 35 or older | |
if self.sane || !self.american || self.age < 35 | |
exit(1) | |
end | |
#assumes all affairs will become public by the time the election is over | |
affair-factor = (all_affairs - repented_affairs) * -1 | |
#if your religion isn't that of our founding fathers- you have problems. | |
if self.religion == public.perceived_founding_father_religion | |
religion_factor = 10 | |
else | |
religion_factor = 0 | |
end | |
#New code for this election! Don't be Santorum | |
if self.google_result == campaign_page | |
google_factor = 10 | |
else | |
google_factor = 0 | |
end | |
#the more pacs you have, the better | |
pac_factor = self.num_pacs | |
#New code again! Don't be Perry | |
if self.debate_skills == low | |
debate_factor = 0 | |
else | |
debate_factor = 10 | |
end | |
charm_factor = self.charm | |
money_factor = self.private_jets | |
#stack them all up | |
self.score = affair_factor + | |
religion_factor + | |
google_factor + | |
pac_factor + | |
debate_factor + | |
charm_factor + | |
money_factor | |
#then determine the winner | |
num_candidates = 0 | |
sum_scores = 0 | |
@candidates.each do |c| | |
num_candidates++ | |
sum_scores += c.score | |
end | |
your_chances = self.score/sum_scores | |
#Good luck! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment