Skip to content

finished assignment but did not address the 3month time passing - wil…#13

Open
SuzHarrison wants to merge 1 commit intoAda-C5:masterfrom
SuzHarrison:master
Open

finished assignment but did not address the 3month time passing - wil…#13
SuzHarrison wants to merge 1 commit intoAda-C5:masterfrom
SuzHarrison:master

Conversation

@SuzHarrison
Copy link
Copy Markdown

I tried to make a loop to get the initial Stack and Queue set to 6 and 10 respectively but it was not testing successfully so opted for pushing these one by one. I put in some puts statements so I could see what the program was returning long the way and to verify that the roll_dice method was always generating a random number.

@sudocrystal
Copy link
Copy Markdown

Would have liked to see these methods inside a class with an initialize method, though I didn't specifically ask for it. :)

Comment thread job-simulation.rb
@workers.push("three")
@workers.push("four")
@workers.push("five")
@workers.push("six")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pushing these as words is definitely harder. Instead, you could have said:

6.times do |i|
  @workers.push(i)
end

or perhaps

(1..6).each do

^^ I think that one works? Maybe?

@sudocrystal
Copy link
Copy Markdown

Overall, this looks good and the logic is sound. The only changes would be around making your solution as a class and then creating an instance of that class for testing.

I can walk through this with you sometime if you want.

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