Ad
  • Custom User Avatar

    Ok, we have to synchronize our current position.

  • Custom User Avatar

    I don't understand this kata. What are we supposed to do in terms of steps when the number gets bigger?

    given number:9999, iterations:9, step: 9
    Log
    [ 9, 9, 9, 9 ]
    
    pos: 1
    [ 1, 0, 0, 9, 9 ]
    
    pos: 0
    [ 2, 0, 0, 9, 9 ]
    
    pos: 4
    [ 2, 0, 1, 0, 0 ]
    
    pos: 3
    [ 2, 0, 1, 1, 0 ]
    
    pos: 2
    [ 2, 0, 2, 1, 0 ]
    
    pos: 1
    [ 2, 1, 2, 1, 0 ]
    
    pos: 0
    [ 3, 1, 2, 1, 0 ]
    
    pos: 4
    [ 3, 1, 2, 1, 1 ]
    
    pos: 3
    [ 3, 1, 2, 2, 1 ]
    expected 31221 to deeply equal 32211
    
  • Custom User Avatar

    From the wiki : https://github.com/Codewars/codewars.com/wiki/Honor-&-Ranks

    Achieving rank progress Honor Description
    Reached 7 kyu 20 you have reached 7kyu (beginner)!
    Reached 6 kyu 30 you have reached 6kyu (novice)!
    Reached 5 kyu 45 you have reached 5kyu (novice)!
    Reached 4 kyu 70 you have reached 4kyu (competent)!
    Reached 3 kyu 100 you have reached 3kyu (competent)!
    Reached 2 kyu 150 you have reached 2kyu (proficient)!
    Reached 1 kyu 225 you have reached 1kyu (proficient)!
    Reached 1 dan 450 you have reached 1dan (master)!
    Reached 2 dan 900 you have reached 2dan (master)!
    Reached 3 dan 1800 you have reached 3dan (master)!
    Reached 4 dan 3600 you have reached 4dan (master)!
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Ok so maybe this isn't a worthy question but.
    How do i iterate through the number, because when i increment the index it gets out of range.
    So like number[i+spacer] is out of range.

  • Custom User Avatar

    Thx! Glad to hear it. You can upvote this puzzle if you like it.

  • Custom User Avatar

    I got caught up on the position moving to the right if the number of digits increases for ages! Good puzzle though - definitely one of the better 6 kata ones.

  • Custom User Avatar

    it's not about the description, it's about the code!

    And "pokemon hit one by one" is a werid way to tell that the first argument hits first, meaning that in my example, slowpoke should definitely win, as you stated it, tho your reference solution expects pikachu.

    => don't resolve issues if you're not sure you handled them. Correctly.

  • Custom User Avatar

    As @docgunthrop pointed out, there're already several katas about 2 fighters exchanging hits.

  • Custom User Avatar
    Start:
      { name: 'Sandslash', dmg: 11, def: 2, hp: 118 }
      { name: 'Slowpoke', dmg: 11, def: 11, hp: 14 }
    
    After 13 attacks:
      { name: 'Sandslash', dmg: 11, def: 2, hp: 1 }
      { name: 'Slowpoke', dmg: 11, def: 11, hp: 1 }
    
    Sandslash attacks and wins:
      expected 'Winner: Sandslash' to equal 'Winner: Slowpoke'
    

    Nothing's good.

  • Custom User Avatar

    You could probably just explicitly say something like A pokemon will always deal at least 1 damage to the opponent, even when their damage is less than or equal to the opponent's defense.

    As @Blind4Basics mentioned above, this information should be provided in the same context as the information about calculating damage, rather than as a note at the end. Flow of information (ie. continuity) is something that should be considered when writing your descriptions so as to avoid confusion.

  • Custom User Avatar

    Rewrute description. Is this look better now?

  • Custom User Avatar

    Does all fine now? I check reference, all look good.

  • Custom User Avatar

    So me need change cata or no? If it possible say me hot write more clear in rules. I am bad in English. What i want to say. If pokemon1 have 10 damage, and pokemon2 have 15defence. Pokemon1 in anyway deal 1 garanted damage. 10 - 9 = 1. 10 - 10 = 1, 10 - 100 = 1. But 12 - 10 = 2 and so on. Help me please. Many people say it wrong, but i check my solution many times and all look fine.

  • Loading more items...