Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alora Riley #2

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Alora Riley #2

wants to merge 21 commits into from

Conversation

aloraalee
Copy link

Since we worked on the battleship project all week, I got to this IC and I felt like I was typing so slowly through it. I didn't finish the last two methods of iteration 3. The reaching through objects and creating a hash with them felt challenging.

@candidates = []
end

def register_candidate!(candidate_info)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the ! operator doing here?

end

describe '#votes' do
it 'has zero votes by default' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test to check the initial state of things

return @races
end

def add_candidate_to_election(candidate_info)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method appears to be doing almost the same thing as register candidate - do you need both?

end

def candiate_name(candidates)
candidates.map do |candiate|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If my map or enum is simple like this - I really like to use the shorter syntax!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants