Ad
  • Default User Avatar

    It seems I really can't understand this description.

    how can ([2, 3, 4, 6, 7, 10], 0) be 12?, sum of array is 32, 0 played so no -20?

  • Custom User Avatar

    fixed by B4B

  • Custom User Avatar

    should be good now.

  • Custom User Avatar
  • Custom User Avatar

    @Bllind4Basics ~~ Ping, you mind fixing this ? (if you still remember what the task is about? ^_^ (kinda unlikely lol XD ! ! ~~

  • Custom User Avatar

    Could the author explain, providing all details to make it comprehensible, how from the input arguments ([2, 4, 6, 7, 8], 2) he manages to get a final score of 20?

    If I try to follow the description :

    1 .To calculate one’s score, a player totals all the number cards they played and any wager cards played are used as score multipliers.

    so total of played cards is 2+4+6+7+8=27

    then I try to apply the so called score multiplier:

    2 wager cards = score * 3

    3*27 = 81

    The case if the player plays any cards at all does not apply here (I guess, or please explain), and Wager points should be multiplied after all other calculations. : that's what I do (I guess, or please explain).

    So I get 81, and not 20. And I can't even imagine how I could do so. Thank you in advance.

  • Custom User Avatar

    Description is little confusing, so my feedback what i see :
    Description has all needed information, but somehow reading it brain skips the info :D
    Changes minor so you can ignore this.

    From :
    Write a function where, given an array of numbers (the numbered cards played) and a second parameter (# of wager cards played), will calculate a player’s score.
    To :
    Write a function where, cardsArr ( array of numbered type cards played) and wager (count of wager type cards played), will calculate a player’s score.

  • Custom User Avatar

    Too long to explain. Just poke at me again in 1 week (I need the issue opened for long enough to access the edit panel).

  • Default User Avatar

    Several people have said this, but no one is willing to provide any useful feedback as to what specifically is unclear. So it's not a useful comment. I've tried to delete the kata and codewars will not allow me to.

  • Custom User Avatar

    the description is totally bad and needs to be rewritten...

  • Default User Avatar

    I agree, that seems out of place.

  • Custom User Avatar

    Thank you! I'm so excited that it has been approved!!

  • Custom User Avatar

    Thanks. That was what I thought - not enough katas that require error throwing.

  • Custom User Avatar

    I think it is clear enough to be solved. I am glad it has been approved, well done.

  • Custom User Avatar

    I got it pretty quickly and then I got to the error part. I was throwing a string and couldn't figure out why it wasn't passing until I read other comments. If you could include in the description that it needs to be an error object, not just a string, that might help. :) But it was good practice for me because I have never even seen an Error object.

  • Loading more items...