Ad
  • Custom User Avatar

    I completed this kata in Ruby but hated it. Here are my issues:

    • Why did the levels switch from perfect squares to not?
    • Why did gold move from the top level in 1 through 4 but the fourth level for 5, the third level for 6, the second level for 7, etc.?
    • Why is the parameter called "level" and can go up to 15, but there are never more than 4 levels in the answer hash?

    Maybe if I had played Minecraft before, I could have solved this kata without using a kind of brute force case statement. I feel as if there was not enough detail in the description. Plus, nothing I Googled explained how the beacon tower needed to go beyond the four basic levels (9 to 25 to 49 to 81 blocks) only that you could make the tower shorter.

    I feel like I wasted a couple of hours of my time with this kata and that it was more like a level 3 or 4 kata.

  • Custom User Avatar
    it "should raise an error for string with illegal characters" do
      Test.expect_error(luck_check('6F43E8'))
    end 
    

    is obviously wrong - can't catch an exception that has already happened. that needs to be in a block. still strange that it doesn't complain when it doesn't raise when that's what it says it tests for. doesn't really matter though, unless this also happens for MRI 3.0.0

  • Custom User Avatar

    For some reason, I was getting an error message that my Ruby code was not throwing an error when I pushed "Test" although my code had this line: raise ArgumentError, "string with illegal characters" if str.empty? || str.match?(/\D/). By commenting out this line, the test passed. However, it wouldn't pass when I pushed "Attempt". So, I removed the # to uncomment the error line before pushing "Attempt", and the code was accepted.