Ad
  • Default User Avatar

    In closures, is the outer function only called once while the inner function is called however many times?

  • Custom User Avatar

    The hardest 7 kyu kata for me so far, no joke.

  • Custom User Avatar

    Java 11 shouldWorkWithRandomValues test fails, but I believe the tests are wrong.
    [, Ryu, E.Honda, Cammy]
    [Balrog, Ken, Chun Li, ]
    [Vega, , Fei Long, Balrog]
    [Blanka, Guile, , Chun Li]
    [M.Bison, Zangief, Dhalsim, Sagat]
    [Deejay, Cammy, , T.Hawk]

    Moves = [left, down, left, right, up, left, left, up, up, left, right, down, left, up, right, left, left, up, up, up, right, down, left, left, right, right]
    Start = 2;2 - Fei Long

    My result = {Vega, Blanka, Chun Li, Blanka, Vega, Balrog, Fei Long, Chun Li, E.Honda, Ryu, E.Honda, Chun Li, Ken, Ryu, E.Honda, Ryu, Cammy, T.Hawk, Sagat, Chun Li, Blanka, M.Bison, Sagat, Dhalsim, Sagat, M.Bison}

    Error: ! arrays first differed at element [17]; expected:<[Cammy]> but was:<[T.Hawk]>

    Move 16 - Moved LEFT from (0;1 - Ryu) Selected: Cammy -> This is supposedly correct and up until this has been correct
    Move 17 - Moved UP from (0;3 - Cammy) Selected: T.Hawk -> Moving UP (moving between rows) from 0;3 (Cammy) leads to 5;3 (T-Hawk)

    EDIT: Apparently the problem is that you should stop if you're trying to go down from the last row or if you're trying to go up from the first row. Not like goinf left or right, wherein the cursor "teleports" to the other side and keeps going.
    So in the example roster (in the description), if you go UP from Ryu, you stay on Ryu. If you go DOWN from Cammy, you stay on Cammy.