Ad
  • Custom User Avatar

    thanks a lot!
    it would be great to have typed functions to make much easier to understand the conditions of the kata.

    I would be happy to updated them if that's possible.

  • Custom User Avatar

    Am I making something wrong? or the random test for PHP is faulty?

    it says for example, that with a bonus of 703 and a price of 1,I should only be able to make 11 floors,
    when 12 full floors would require 650 cans

    or with a bonus: 739 and price: 5 (147 buyable beers) it can only make 6 floors, when 7 requires 140 cans

    or with a bonus: 720 and price: 5 (144 buyable beers) it can only make 6 floors, when 7 requires 140 cans

    or with a bonus: 876 and price: 2 (438 buyable beers) it can only make 9 floors, when 10 requires 385 cans

  • Custom User Avatar

    oh my I totally missed it, thanks!

  • Custom User Avatar

    Seems like the test cases for PHP are faulty:

    I'm getting and error with the following test case:

    array 1

    Array
    (
        [0] => 121
        [1] => 144
        [2] => 19
        [3] => 161
        [4] => 19
        [5] => 144
        [6] => 19
        [7] => 11
    )
    

    squared and counted array 1

    Array
    (
        [14641] => 1
        [20736] => 2
        [361] => 3
        [25921] => 1
        [121] => 1
    )
    

    array 2

    Array
    (
        [0] => 121
        [1] => 14641
        [2] => 20736
        [3] => 36100
        [4] => 25921
        [5] => 361
        [6] => 20736
        [7] => 361
    )
    

    squared and counted array 2

    Array
    (
        [121] => 1
        [14641] => 1
        [20736] => 2
        [36100] => 1
        [25921] => 1
        [361] => 2
    )
    

    invalid

    Failed asserting that false is identical to true.