7 kyu

Tetris Series #1 — Scoring System

983 of 1,929Etoneja
Description
Loading description...
Fundamentals
Games
Algorithms
Arrays
  • Please sign in or sign up to leave a comment.
  • SS-Stefanov1 Avatar

    Cool kata, but one thing I can't get is how the random tests are suppose to work?

    My solution passes all the basic tests, but random tests all return "Cannot read properties of undefined",

    when I copy the input from the random test in VScode for example though it works fine and returns the score?

  • 3au4onok Avatar

    Terrible description. The process of moving to a new level is not described; I had to try all the options to find the right one. Wasted my time

  • mohdmujtabaa Avatar

    Nice kata, thanks for author for putting this up.

  • gaborio Avatar

    Good one! Thanks

  • laurelis24 Avatar

    Pretty decent for 7.

  • ejini战神 Avatar
    • Python new test framework should be used (Refer this & this for more detail)
  • ejini战神 Avatar
    • Ruby 3.0 should be enabled (Refer this & this for more detail)
  • ejini战神 Avatar
    • Missing return type in initial soluton of TS
  • Infuzibil Avatar

    Nice kata, perfect example on how to build an algorithm step-by-step.

  • stefaniesatna Avatar

    Thank you! Very enjoyable kata.

  • timeuss Avatar

    I realy liked this kata, I learned a lot whith. Thank to the author :)

  • samarb Avatar

    This comment has been hidden.

  • webmisfit Avatar

    stupid description in javascript - dislike this kata. IAM ANGRY Mistakes in example - getScore([4, 2, 2, 3, 3, 4, 2]); // returns 4700 its return 4900 WTF

  • user8436785 Avatar
  • mingmingrr Avatar
  • vikihow Avatar

    i am running the random tests while attempting to submit my code and it seems that the math in the tests is not correct. I am testing Python solution. For example i have got the following message after running my code: Failed when arr = [1, 4, 1, 4, 1, 4, 1, 1, 2, 0, 0, 4, 2, 3, 3, 3, 3, 4, 0, 0, 1, 2, 1, 0, 1, 2]: 18180 should equal 18620 well. let's see: level 0: 1,4,1,4: 40+1200+40+1200 = 2480 level 1: 1,4,1,1,2,0,0,4: 80 + 2400+80+80+200+0+0+2400 = 5240 level 2: 2,3,3,3 : 300+900+900+900 = 3000 level 3: 3,4,0,0,1,2: 1200 + 4800 + 0 + 0 + 160+400 = 6560 level 4: 1,0,1,2: 200+ 0 + 200 +500 = 900 score = 2480+5240+3000+6560+900 = 18180

    some of the tests are passed and some of them are incorrect as the one above. could you please check if I am missing something or the test case is really incorrect?

  • Bug-007 Avatar

    This comment has been hidden.

  • rowcased Avatar
  • stellartux Avatar
  • Robert Codewars Avatar

    This comment has been hidden.

  • vmunhoz Avatar

    It was great solving this! But I think that the description of what happens when you level up with more than exact 10 lines. There is nothing explaining that the remainder should remains, instead of going to zero.

  • RazNaot Avatar

    I disagree with the arithmetics in the provided example - total should be 4900 and not 4700

  • Voile Avatar

    Why is 0 a possible array element? Clearing 0 lines is absurd.

  • Voile Avatar

    Looks like the kata is inspired by the upcoming CTWC ;-)

  • FArekkusu Avatar

    The user can modify the input in JavaScript.

  • user8436785 Avatar

    JS:

    • reference solution is in global scope (that's the issue label reason)
    • please use node 10 and chai
    • polluting global scope with random tests for loop (i is not declared yet)

    Python: Try out the test framework v2.

  • user8436785 Avatar

    JS naming convention is camelCase, not snake_case