Ad
  • Custom User Avatar

    Timeounts in this kata are indeed problematic, because (at least in JS) even valid solutions have ~40% chance to time out. Test suite is very unbalanced and times vary between 4.5s to timeout.

    You could try to submit your solution a couple of times, but if it does not pass after 3 times, then you probably still have something to optimize.

  • Default User Avatar

    131 game maps will be presented. (31 basic and 100 random maps)
    However the number of "tests" will be higher, since for every presented map several assertions will be done.
    You can see how many maps you solved in the logs.

  • Custom User Avatar

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

  • Custom User Avatar

    If you look at the test cases, it's way easier than in my original kumite:
    test.assert_equals(calculate_2048(s), (2**(ss+1),2**(ss+2)-4)) #don't tell the actual solver it's this easy
    I just thought my way was more fun.

  • Default User Avatar

    made me laugh :D

  • Custom User Avatar

    It is modeled as being dropped from above the playing field.

  • Custom User Avatar

    Thank you very much, hopefully that saves me some time haha.

    One other question, do you have to account for colliding into the active playing field when moving the piece, or can it be modelled as being dropped from above the playing field? I know it says you can in the detail text but the image diagrams seem to imply otherwise.

  • Custom User Avatar

    you have to keep track of them on your own.

  • Custom User Avatar

    I have a question: the power gem behaviour is quite confusing, but if you have the board state of where all the colours are, are you able to unambiguously tell where the power gems are, or do you have to keep track of them also, in order to manage merging behaviour?